new individual event-tests + removed old comments + removed doubled exception
Co-authored-by: Christoph <tobi@urpost.de>
This commit is contained in:
24
src/test/java/mops/gruppen2/domain/event/EventTest.java
Normal file
24
src/test/java/mops/gruppen2/domain/event/EventTest.java
Normal file
@ -0,0 +1,24 @@
|
||||
package mops.gruppen2.domain.event;
|
||||
|
||||
import mops.gruppen2.TestBuilder;
|
||||
import mops.gruppen2.domain.Group;
|
||||
import mops.gruppen2.domain.exception.GroupIdMismatchException;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import static mops.gruppen2.TestBuilder.createPublicGroupEvent;
|
||||
import static mops.gruppen2.TestBuilder.uuidFromInt;
|
||||
import static org.junit.jupiter.api.Assertions.assertThrows;
|
||||
|
||||
class EventTest {
|
||||
|
||||
@Test
|
||||
void apply() {
|
||||
Event createEvent = createPublicGroupEvent(uuidFromInt(0));
|
||||
Event addEvent = TestBuilder.addUserEvent(uuidFromInt(1));
|
||||
|
||||
Group group = TestBuilder.apply(createEvent);
|
||||
|
||||
assertThrows(GroupIdMismatchException.class, () -> addEvent.apply(group));
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user