1

new individual event-tests + removed old comments + removed doubled exception

Co-authored-by: Christoph <tobi@urpost.de>
This commit is contained in:
Christoph
2020-03-29 15:47:25 +02:00
parent 33ccf8ddcb
commit 58f0cfbe33
18 changed files with 314 additions and 115 deletions

View 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));
}
}