Search in sources :

Example 1 with TesteesOptions

use of easytests.core.options.TesteesOptions in project easy-tests by malinink.

the class TesteesServiceTest method testFindWithOptions.

@Test
public void testFindWithOptions() throws Exception {
    final Integer id = 1;
    final Integer quizId = 1;
    final TesteeModelInterface testeeModel = Models.createTesteeModel(id, "FirstName1", "LastName1", "Surname1", 301, quizId);
    final QuizModelInterface quizModel = Models.createQuizModel(quizId, "test_invite_code1", 1, LocalDateTime.of(2003, 2, 1, 0, 0, 0), LocalDateTime.of(2003, 3, 1, 0, 0, 0), false);
    testeeModel.setQuiz(quizModel);
    final TesteeModelInterface foundedTesteeModel = this.testeesService.find(id, new TesteesOptions().withQuiz(new QuizzesOptions()));
    Assert.assertEquals(testeeModel, foundedTesteeModel);
    Assert.assertEquals(quizModel, foundedTesteeModel.getQuiz());
}
Also used : QuizModelInterface(easytests.core.models.QuizModelInterface) QuizzesOptions(easytests.core.options.QuizzesOptions) TesteesOptions(easytests.core.options.TesteesOptions) TesteeModelInterface(easytests.core.models.TesteeModelInterface) Test(org.junit.Test) SpringBootTest(org.springframework.boot.test.context.SpringBootTest)

Aggregations

QuizModelInterface (easytests.core.models.QuizModelInterface)1 TesteeModelInterface (easytests.core.models.TesteeModelInterface)1 QuizzesOptions (easytests.core.options.QuizzesOptions)1 TesteesOptions (easytests.core.options.TesteesOptions)1 Test (org.junit.Test)1 SpringBootTest (org.springframework.boot.test.context.SpringBootTest)1