Search in sources :

Example 6 with QuestionTypesServiceInterface

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);
}
Also used : QuestionTypesServiceInterface(easytests.core.services.QuestionTypesServiceInterface) QuestionModelInterface(easytests.core.models.QuestionModelInterface) TopicsServiceInterface(easytests.core.services.TopicsServiceInterface) AnswersServiceInterface(easytests.core.services.AnswersServiceInterface) Test(org.junit.Test) SpringBootTest(org.springframework.boot.test.context.SpringBootTest)

Aggregations

QuestionTypesServiceInterface (easytests.core.services.QuestionTypesServiceInterface)6 Test (org.junit.Test)6 SpringBootTest (org.springframework.boot.test.context.SpringBootTest)6 QuestionTypeModelInterface (easytests.core.models.QuestionTypeModelInterface)4 QuestionTypeModelEmpty (easytests.core.models.empty.QuestionTypeModelEmpty)4 IssueStandardQuestionTypeOptionModelInterface (easytests.core.models.IssueStandardQuestionTypeOptionModelInterface)3 QuestionModelInterface (easytests.core.models.QuestionModelInterface)3 AnswersServiceInterface (easytests.core.services.AnswersServiceInterface)3 IssueStandardsServiceInterface (easytests.core.services.IssueStandardsServiceInterface)3 TopicsServiceInterface (easytests.core.services.TopicsServiceInterface)3 ArrayList (java.util.ArrayList)3 AnswerModelInterface (easytests.core.models.AnswerModelInterface)2 IssueStandardModelInterface (easytests.core.models.IssueStandardModelInterface)2 TopicModelInterface (easytests.core.models.TopicModelInterface)2 IssueStandardModelEmpty (easytests.core.models.empty.IssueStandardModelEmpty)2 TopicModelEmpty (easytests.core.models.empty.TopicModelEmpty)2