use of easytests.core.services.QuestionTypesServiceInterface in project easy-tests by malinink.
the class QuestionsOptionsTest method testWithRelationsOnNull.
@Test
public void testWithRelationsOnNull() throws Exception {
final QuestionModelInterface questionModel = null;
final QuestionsOptionsInterface questionsOptions = new QuestionsOptions();
final AnswersServiceInterface answersService = Mockito.mock(AnswersServiceInterface.class);
final AnswersOptionsInterface answersOptions = Mockito.mock(AnswersOptionsInterface.class);
final TopicsServiceInterface topicsService = Mockito.mock(TopicsServiceInterface.class);
final TopicsOptionsInterface topicsOptions = Mockito.mock(TopicsOptionsInterface.class);
final QuestionTypesServiceInterface questionTypesService = Mockito.mock(QuestionTypesServiceInterface.class);
final QuestionTypesOptionsInterface questionTypesOptions = Mockito.mock(QuestionTypesOptionsInterface.class);
questionsOptions.setAnswersService(answersService);
questionsOptions.withAnswers(answersOptions);
questionsOptions.setTopicsService(topicsService);
questionsOptions.withTopic(topicsOptions);
questionsOptions.setQuestionTypesService(questionTypesService);
questionsOptions.withQuestionType(questionTypesOptions);
final QuestionModelInterface questionModelWithRelations = questionsOptions.withRelations(questionModel);
Assert.assertEquals(null, questionModelWithRelations);
}
Aggregations