Search in sources :

Example 36 with ModelsListEmpty

use of easytests.core.models.empty.ModelsListEmpty 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());
}
Also used : SubjectModelEmpty(easytests.core.models.empty.SubjectModelEmpty) ModelsListEmpty(easytests.core.models.empty.ModelsListEmpty) IssueEntity(easytests.core.entities.IssueEntity) SpringBootTest(org.springframework.boot.test.context.SpringBootTest) Test(org.junit.Test)

Aggregations

ModelsListEmpty (easytests.core.models.empty.ModelsListEmpty)36 Test (org.junit.Test)13 SubjectModelEmpty (easytests.core.models.empty.SubjectModelEmpty)11 SpringBootTest (org.springframework.boot.test.context.SpringBootTest)8 IssueStandardModelEmpty (easytests.core.models.empty.IssueStandardModelEmpty)7 UserModelEmpty (easytests.core.models.empty.UserModelEmpty)7 QuestionTypeModelEmpty (easytests.core.models.empty.QuestionTypeModelEmpty)5 TopicModelEmpty (easytests.core.models.empty.TopicModelEmpty)5 IssueStandardModelInterface (easytests.core.models.IssueStandardModelInterface)4 SubjectModelInterface (easytests.core.models.SubjectModelInterface)4 IssueModelEmpty (easytests.core.models.empty.IssueModelEmpty)3 QuestionModelEmpty (easytests.core.models.empty.QuestionModelEmpty)3 QuizModelEmpty (easytests.core.models.empty.QuizModelEmpty)3 TesteeModelEmpty (easytests.core.models.empty.TesteeModelEmpty)3 IssueStandardQuestionTypeOptionModelInterface (easytests.core.models.IssueStandardQuestionTypeOptionModelInterface)2 IssueStandardTopicPriorityModelInterface (easytests.core.models.IssueStandardTopicPriorityModelInterface)2 IssueStandardQuestionTypeOptionsServiceInterface (easytests.core.services.IssueStandardQuestionTypeOptionsServiceInterface)2 IssueStandardTopicPrioritiesServiceInterface (easytests.core.services.IssueStandardTopicPrioritiesServiceInterface)2 SubjectsServiceInterface (easytests.core.services.SubjectsServiceInterface)2 ArrayList (java.util.ArrayList)2