use of easytests.core.models.empty.SubjectModelEmpty in project easy-tests by malinink.
the class IssueModelTest method testMap.
@Test
public void testMap() throws Exception {
final Integer issueId = 1;
final String name = "Name";
final Integer subjectId = 1;
final IssueEntity issueEntity = Mockito.mock(IssueEntity.class);
Mockito.when(issueEntity.getId()).thenReturn(issueId);
Mockito.when(issueEntity.getName()).thenReturn(name);
Mockito.when(issueEntity.getSubjectId()).thenReturn(subjectId);
final IssueModel issueModel = new IssueModel();
issueModel.map(issueEntity);
Assert.assertEquals(issueId, issueModel.getId());
Assert.assertEquals(name, issueModel.getName());
Assert.assertEquals(new ModelsListEmpty(), issueModel.getQuizzes());
Assert.assertEquals(new SubjectModelEmpty(subjectId), issueModel.getSubject());
}
Aggregations