Search in sources :

Example 26 with ModelsListEmpty

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);
}
Also used : TopicModelEmpty(easytests.core.models.empty.TopicModelEmpty) ModelsListEmpty(easytests.core.models.empty.ModelsListEmpty) QuestionTypeModelEmpty(easytests.core.models.empty.QuestionTypeModelEmpty) Test(org.junit.Test) SpringBootTest(org.springframework.boot.test.context.SpringBootTest)

Example 27 with ModelsListEmpty

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());
}
Also used : ModelsListEmpty(easytests.core.models.empty.ModelsListEmpty) TesteeModelEmpty(easytests.core.models.empty.TesteeModelEmpty) IssueModelEmpty(easytests.core.models.empty.IssueModelEmpty)

Example 28 with ModelsListEmpty

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());
}
Also used : QuestionModelEmpty(easytests.core.models.empty.QuestionModelEmpty) ModelsListEmpty(easytests.core.models.empty.ModelsListEmpty) QuizModelEmpty(easytests.core.models.empty.QuizModelEmpty)

Example 29 with 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());
}
Also used : TopicModelEmpty(easytests.core.models.empty.TopicModelEmpty) ModelsListEmpty(easytests.core.models.empty.ModelsListEmpty) QuestionTypeModelEmpty(easytests.core.models.empty.QuestionTypeModelEmpty)

Example 30 with 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());
}
Also used : ModelsListEmpty(easytests.core.models.empty.ModelsListEmpty)

Aggregations

ModelsListEmpty (easytests.core.models.empty.ModelsListEmpty)36 Test (org.junit.Test)13 SubjectModelEmpty (easytests.core.models.empty.SubjectModelEmpty)11 SpringBootTest (org.springframework.boot.test.context.SpringBootTest)8 IssueStandardModelEmpty (easytests.core.models.empty.IssueStandardModelEmpty)7 UserModelEmpty (easytests.core.models.empty.UserModelEmpty)7 QuestionTypeModelEmpty (easytests.core.models.empty.QuestionTypeModelEmpty)5 TopicModelEmpty (easytests.core.models.empty.TopicModelEmpty)5 IssueStandardModelInterface (easytests.core.models.IssueStandardModelInterface)4 SubjectModelInterface (easytests.core.models.SubjectModelInterface)4 IssueModelEmpty (easytests.core.models.empty.IssueModelEmpty)3 QuestionModelEmpty (easytests.core.models.empty.QuestionModelEmpty)3 QuizModelEmpty (easytests.core.models.empty.QuizModelEmpty)3 TesteeModelEmpty (easytests.core.models.empty.TesteeModelEmpty)3 IssueStandardQuestionTypeOptionModelInterface (easytests.core.models.IssueStandardQuestionTypeOptionModelInterface)2 IssueStandardTopicPriorityModelInterface (easytests.core.models.IssueStandardTopicPriorityModelInterface)2 IssueStandardQuestionTypeOptionsServiceInterface (easytests.core.services.IssueStandardQuestionTypeOptionsServiceInterface)2 IssueStandardTopicPrioritiesServiceInterface (easytests.core.services.IssueStandardTopicPrioritiesServiceInterface)2 SubjectsServiceInterface (easytests.core.services.SubjectsServiceInterface)2 ArrayList (java.util.ArrayList)2