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());
}
Aggregations