Added Assignment Response Model

This commit is contained in:
Filip Izydorczyk
2020-10-08 15:57:42 +02:00
parent f9706e0e01
commit 9d97306e5c
3 changed files with 83 additions and 1 deletions

View File

@ -0,0 +1,28 @@
package com.plannaplan.responses.models;
import static org.junit.jupiter.api.Assertions.assertTrue;
import com.plannaplan.entities.Groups;
import com.plannaplan.entities.Lecturer;
import com.plannaplan.types.GroupType;
import com.plannaplan.types.WeekDay;
import org.junit.Test;
public class AssignmentResponseTest {
@Test
public void shouldMapGroupClassToResponse() {
final Groups group = new Groups(42, "A4-1", null, 520, WeekDay.MONDAY,
new Lecturer("krul.", "Wladyslaw", "Potocki"));
final AssignmentResponse response = new AssignmentResponse(group);
assertTrue(response.getCapacity() == 42);
assertTrue(response.getDay() == 0);
assertTrue(response.getLecturer().equals("krul. Wladyslaw Potocki"));
assertTrue(response.getRoom().equals("A4-1"));
assertTrue(response.getTime().equals("8.40"));
assertTrue(response.getType() == GroupType.CLASS);
}
}