use of easytests.core.options.IssueStandardQuestionTypeOptionsOptionsInterface in project easy-tests by malinink.
the class IssueStandardQuestionTypeOptionsServiceTest method testFindWithOptions.
@Test
public void testFindWithOptions() throws Exception {
final Integer id = 1;
final IssueStandardQuestionTypeOptionEntity questionTypeOptionEntity = Entities.createQuestionTypeOptionEntityMock(id, 1, 10, 20, 60, 1);
final IssueStandardQuestionTypeOptionModelInterface questionTypeOptionModel = this.mapQuestionTypeOptionModel(questionTypeOptionEntity);
final IssueStandardQuestionTypeOptionsOptionsInterface questionTypeOptionsOptions = Mockito.mock(IssueStandardQuestionTypeOptionsOptionsInterface.class);
given(this.questionTypeOptionsMapper.find(id)).willReturn(questionTypeOptionEntity);
given(questionTypeOptionsOptions.withRelations(questionTypeOptionModel)).willReturn(questionTypeOptionModel);
final IssueStandardQuestionTypeOptionModelInterface foundedQuestionTypeOptionModel = this.questionTypeOptionsService.find(id, questionTypeOptionsOptions);
verify(questionTypeOptionsOptions).withRelations(questionTypeOptionModel);
Assert.assertNotNull(foundedQuestionTypeOptionModel);
Assert.assertEquals(questionTypeOptionModel, foundedQuestionTypeOptionModel);
}
Aggregations