Search in sources :

Example 6 with AnswerModel

use of easytests.core.models.AnswerModel in project easy-tests by malinink.

the class AnswersServiceTest method createAnswerModel.

private AnswerModelInterface createAnswerModel(Integer id, String txt, Integer questionId, Integer serialNumber, Boolean right) {
    final AnswerModelInterface answerModel = new AnswerModel();
    answerModel.setId(id);
    answerModel.setTxt(txt);
    answerModel.setSerialNumber(serialNumber);
    answerModel.setRight(true);
    final QuestionModelInterface questionModel = Mockito.mock(QuestionModelInterface.class);
    Mockito.when(questionModel.getId()).thenReturn(questionId);
    answerModel.setQuestion(questionModel);
    return answerModel;
}
Also used : AnswerModel(easytests.core.models.AnswerModel) QuestionModelInterface(easytests.core.models.QuestionModelInterface) AnswerModelInterface(easytests.core.models.AnswerModelInterface)

Example 7 with AnswerModel

use of easytests.core.models.AnswerModel in project easy-tests by malinink.

the class AnswersServiceTest method createAnswerModel.

private AnswerModelInterface createAnswerModel(Integer id, String txt, QuestionModelInterface question, Integer serialNumber, boolean right) {
    final AnswerModelInterface answerModel = new AnswerModel();
    answerModel.setId(id);
    answerModel.setTxt(txt);
    answerModel.setQuestion(question);
    answerModel.setSerialNumber(serialNumber);
    answerModel.setRight(right);
    return answerModel;
}
Also used : AnswerModel(easytests.core.models.AnswerModel) AnswerModelInterface(easytests.core.models.AnswerModelInterface)

Aggregations

AnswerModel (easytests.core.models.AnswerModel)7 AnswerModelInterface (easytests.core.models.AnswerModelInterface)6 AnswersOptionsInterface (easytests.core.options.AnswersOptionsInterface)2 QuestionModelInterface (easytests.core.models.QuestionModelInterface)1 ArrayList (java.util.ArrayList)1