Search in sources :

Example 21 with QuizEntity

use of easytests.core.entities.QuizEntity in project easy-tests by malinink.

the class QuizzesServiceTest method testFindPresentModel.

@Test
public void testFindPresentModel() throws Exception {
    final Integer id = 1;
    final QuizEntity quizEntity = this.createQuizEntityMock(id, "test", 1);
    given(this.quizzesMapper.find(id)).willReturn(quizEntity);
    final QuizModelInterface quizModel = this.quizzesService.find(id);
    Assert.assertEquals(this.mapQuizModel(quizEntity), quizModel);
}
Also used : QuizEntity(easytests.core.entities.QuizEntity) QuizModelInterface(easytests.core.models.QuizModelInterface) Test(org.junit.Test) SpringBootTest(org.springframework.boot.test.context.SpringBootTest)

Example 22 with QuizEntity

use of easytests.core.entities.QuizEntity in project easy-tests by malinink.

the class QuizzesServiceTest method getQuizzesEntities.

private List<QuizEntity> getQuizzesEntities() {
    final List<QuizEntity> quizzesEntities = new ArrayList<>(2);
    final QuizEntity quizEntityFirst = this.createQuizEntityMock(1, "test1", 1);
    final QuizEntity quizEntitySecond = this.createQuizEntityMock(2, "test2", 2);
    quizzesEntities.add(quizEntityFirst);
    quizzesEntities.add(quizEntitySecond);
    return quizzesEntities;
}
Also used : QuizEntity(easytests.core.entities.QuizEntity) ArrayList(java.util.ArrayList)

Aggregations

QuizEntity (easytests.core.entities.QuizEntity)22 Test (org.junit.Test)14 SpringBootTest (org.springframework.boot.test.context.SpringBootTest)11 QuizModelInterface (easytests.core.models.QuizModelInterface)7 ArrayList (java.util.ArrayList)4 IssueModelInterface (easytests.core.models.IssueModelInterface)3 QuizzesOptionsInterface (easytests.core.options.QuizzesOptionsInterface)3 LocalDateTime (java.time.LocalDateTime)3 IssueModelEmpty (easytests.core.models.empty.IssueModelEmpty)1 ModelsListEmpty (easytests.core.models.empty.ModelsListEmpty)1 TesteeModelEmpty (easytests.core.models.empty.TesteeModelEmpty)1 DeleteUnidentifiedModelException (easytests.core.services.exceptions.DeleteUnidentifiedModelException)1