change SerializationServiceTest
This commit is contained in:
@ -52,7 +52,7 @@ public class SwaggerAPIControllerExample {
|
|||||||
|
|
||||||
return "Product saved successfully";
|
return "Product saved successfully";
|
||||||
}
|
}
|
||||||
|
/*
|
||||||
@GetMapping("/json")
|
@GetMapping("/json")
|
||||||
public void json() {
|
public void json() {
|
||||||
AddUserEvent aEvent = new AddUserEvent(
|
AddUserEvent aEvent = new AddUserEvent(
|
||||||
|
|||||||
@ -6,8 +6,6 @@ import lombok.*;
|
|||||||
* Entfernt ein einzelnes Mitglied einer Gruppe.
|
* Entfernt ein einzelnes Mitglied einer Gruppe.
|
||||||
*/
|
*/
|
||||||
@Getter
|
@Getter
|
||||||
@AllArgsConstructor
|
|
||||||
@NoArgsConstructor
|
|
||||||
public class DeleteUserEvent extends Event {
|
public class DeleteUserEvent extends Event {
|
||||||
|
|
||||||
public DeleteUserEvent(long event_id, long group_id, String user_id) {
|
public DeleteUserEvent(long event_id, long group_id, String user_id) {
|
||||||
|
|||||||
@ -1,6 +1,8 @@
|
|||||||
package mops.gruppen2.service;
|
package mops.gruppen2.service;
|
||||||
|
|
||||||
import com.fasterxml.jackson.core.JsonProcessingException;
|
import com.fasterxml.jackson.core.JsonProcessingException;
|
||||||
|
import mops.gruppen2.builder.EventBuilder;
|
||||||
|
import mops.gruppen2.domain.event.AddUserEvent;
|
||||||
import mops.gruppen2.domain.event.Event;
|
import mops.gruppen2.domain.event.Event;
|
||||||
import mops.gruppen2.repository.EventRepository;
|
import mops.gruppen2.repository.EventRepository;
|
||||||
import org.junit.jupiter.api.BeforeEach;
|
import org.junit.jupiter.api.BeforeEach;
|
||||||
@ -9,13 +11,15 @@ import org.junit.jupiter.api.Test;
|
|||||||
|
|
||||||
import static org.assertj.core.api.Assertions.assertThat;
|
import static org.assertj.core.api.Assertions.assertThat;
|
||||||
import static org.junit.jupiter.api.Assertions.*;
|
import static org.junit.jupiter.api.Assertions.*;
|
||||||
|
import static org.mockito.Mockito.mock;
|
||||||
|
|
||||||
class SerializationServiceTest {
|
class SerializationServiceTest {
|
||||||
|
|
||||||
EventRepository eventRepository;
|
EventRepository eventRepository;
|
||||||
|
Event event;
|
||||||
|
|
||||||
@BeforeEach
|
@BeforeEach
|
||||||
public void setUp() {
|
public void setUp(){
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -37,10 +41,10 @@ class SerializationServiceTest {
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
void deserializeAddUserEvent() {
|
void deserializeAddUserEvent() {
|
||||||
SerializationService serializationService = new SerializationService();
|
SerializationService serializationService = new SerializationService(mock(EventRepository.class));
|
||||||
|
|
||||||
Event event = EventBuilder.randomAddUserEvent();
|
Event event = EventBuilder.randomAddUserEvent();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user