1

further refactor of eventhandling

Co-Authored-By: Talha Caliskan <killerber4t@users.noreply.github.com>
Co-Authored-By: tomvahl <tomvahl@users.noreply.github.com>
Co-Authored-By: xxnitram <xxnitram@users.noreply.github.com>
Co-Authored-By: kasch309 <kasch309@users.noreply.github.com>
This commit is contained in:
Lukas Ettel
2020-03-16 16:33:26 +01:00
parent ee6d2cca9f
commit abd99f6a5e
10 changed files with 60 additions and 29 deletions

View File

@ -23,7 +23,7 @@ class SerializationServiceTest {
@Test
void serializeEventTest() throws JsonProcessingException {
Event event = new Event(1L,1L,"1");
Event event = new Event(1L,"1");
assertThat(serializationService.serializeEvent(event)).isEqualTo("{\"type\":\"Event\",\"event_id\":1,\"group_id\":1,\"user_id\":\"1\"}");
}
@ -66,7 +66,7 @@ class SerializationServiceTest {
@Test
void deserializeUpdateRoleEventToRightClass() throws JsonProcessingException {
System.out.println(serializationService.serializeEvent(new UpdateRoleEvent(1L, 1L, "1", Role.ADMIN)));
System.out.println(serializationService.serializeEvent(new UpdateRoleEvent(1L, "1", Role.ADMIN)));
String json = "{\"type\":\"UpdateRoleEvent\",\"event_id\":1,\"group_id\":1,\"user_id\":1,\"newRole\":\"ADMIN\"}";