Added new test for new columns and update groups

Signed-off-by: Marcin Woźniak <y0rune@aol.com>
This commit is contained in:
2020-12-26 14:18:47 +01:00
parent f51979484f
commit c3d78505c8
5 changed files with 79 additions and 2 deletions

View File

@ -92,8 +92,12 @@ public class FileToDatabaseMigrator {
.orElseGet(() -> this.lecturerService
.save(new Lecturer(lecturerTitle, lecturerName, lecturerSurname)));
this.groupService.find(zajCykId, grNr).orElseGet(
() -> this.groupService.save(new Groups(capacity, room, course, time, groupDay, lecturer, zajCykId, grNr)));
Groups group = this.groupService.find(zajCykId, grNr).orElseGet(
() -> new Groups(capacity, room, course, time, groupDay, lecturer, zajCykId, grNr));
group.update(capacity, room, course, time, null, groupDay, lecturer);
this.groupService.save(group);
}