Added Assignment Response Model
This commit is contained in:
@ -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);
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user