1

Implementation of old EventExeptions

This commit is contained in:
Lukas Ettel
2020-03-17 15:57:26 +01:00
parent 1acfcc449f
commit 991bcf2aaa
8 changed files with 78 additions and 45 deletions

View File

@ -1,6 +1,5 @@
package mops.gruppen2.service;
import mops.gruppen2.domain.Exceptions.GroupDoesNotExistException;
import mops.gruppen2.domain.Group;
import mops.gruppen2.domain.GroupType;
import mops.gruppen2.domain.Visibility;
@ -29,36 +28,6 @@ class GroupServiceTest {
groupService = new GroupService(mock(EventService.class), eventRepository);
}
@Disabled
@Test
void applyEventOnGroupThatIsDeleted() throws Exception {
List<Event> eventList = new ArrayList<>();
eventList.add(new CreateGroupEvent(1L,"Ulli", null, GroupType.LECTURE, Visibility.PRIVATE));
eventList.add(new DeleteGroupEvent(10, "loescher78"));
eventList.add(new AddUserEvent(10L, "Ulli", "Ulli", "Honnis", "FC@B.de"));
Assertions.assertThrows(GroupDoesNotExistException.class, () -> {
groupService.projectEventList(eventList);
});
}
@Disabled
@Test
void returnDeletedGroup() throws Exception {
List<Event> eventList = new ArrayList<>();
eventList.add(new CreateGroupEvent(1L, "Prof", null, GroupType.LECTURE, Visibility.PRIVATE));
eventList.add(new DeleteGroupEvent(1L, "loescher78"));
List<Group> list = new ArrayList<>();
assertThat(groupService.projectEventList(eventList)).isEqualTo(list);
}
@Test
void rightClassForSucsessfulGroup() throws Exception {