use of easytests.core.models.empty.ModelsListEmpty in project easy-tests by malinink.
the class QuestionsServiceTest method testSaveModel.
@Test
public void testSaveModel() throws Exception {
final QuestionModelInterface questionModel = new QuestionModel();
questionModel.setText("test1");
questionModel.setQuestionType(new QuestionTypeModelEmpty(1));
questionModel.setAnswers(new ModelsListEmpty());
questionModel.setTopic(new TopicModelEmpty(1));
this.questionsService.save(questionModel);
final QuestionModelInterface foundedQuestionModel = this.questionsService.find(questionModel.getId());
Assert.assertEquals(questionModel, foundedQuestionModel);
}
use of easytests.core.models.empty.ModelsListEmpty in project easy-tests by malinink.
the class QuizModel method map.
public void map(QuizEntity quizEntity) {
this.setId(quizEntity.getId());
this.setCodeExpired(quizEntity.getCodeExpired());
this.setStartedAt(quizEntity.getStartedAt());
this.setFinishedAt(quizEntity.getFinishedAt());
this.setIssue(new IssueModelEmpty(quizEntity.getIssueId()));
this.setInviteCode(quizEntity.getInviteCode());
this.setPoints(new ModelsListEmpty());
this.setTestee(new TesteeModelEmpty());
}
use of easytests.core.models.empty.ModelsListEmpty in project easy-tests by malinink.
the class PointModel method map.
public void map(PointEntity pointEntity) {
this.setId(pointEntity.getId());
this.setQuestion(new QuestionModelEmpty(pointEntity.getQuestionId()));
this.setQuiz(new QuizModelEmpty(pointEntity.getQuizId()));
this.setSolutions(new ModelsListEmpty());
}
use of easytests.core.models.empty.ModelsListEmpty in project easy-tests by malinink.
the class QuestionModel method map.
public void map(QuestionEntity questionEntity) {
this.setId(questionEntity.getId());
this.setText(questionEntity.getText());
this.setQuestionType(new QuestionTypeModelEmpty(questionEntity.getQuestionTypeId()));
this.setTopic(new TopicModelEmpty(questionEntity.getTopicId()));
this.setAnswers(new ModelsListEmpty());
}
use of easytests.core.models.empty.ModelsListEmpty in project easy-tests by malinink.
the class UserModelDto method mapInto.
public void mapInto(UserModelInterface userModel) {
userModel.setFirstName(this.getFirstName());
userModel.setLastName(this.getLastName());
userModel.setSurname(this.getSurname());
userModel.setEmail(this.getEmail());
if (!this.getPassword().equals("")) {
userModel.setPassword(this.getPassword());
}
userModel.setIsAdmin(this.getIsAdmin());
userModel.setState(this.getState());
userModel.setSubjects(new ModelsListEmpty());
}
Aggregations