use of easytests.core.models.empty.ModelsListEmpty in project easy-tests by malinink.
the class UsersSupport method assertEquals.
public void assertEquals(UserEntity expected, UserModelInterface actual) {
assertEquals(actual, expected);
Assert.assertEquals(new ModelsListEmpty(), actual.getSubjects());
}
use of easytests.core.models.empty.ModelsListEmpty in project easy-tests by malinink.
the class UsersSupport method getModelMock.
private UserModelInterface getModelMock(Integer id, String firstName, String lastName, String surname, String email, String password, Boolean isAdmin, Integer state) {
final UserModelInterface userModel = Mockito.mock(UserModelInterface.class);
Mockito.when(userModel.getId()).thenReturn(id);
Mockito.when(userModel.getFirstName()).thenReturn(firstName);
Mockito.when(userModel.getLastName()).thenReturn(lastName);
Mockito.when(userModel.getSurname()).thenReturn(surname);
Mockito.when(userModel.getEmail()).thenReturn(email);
Mockito.when(userModel.getPassword()).thenReturn(password);
Mockito.when(userModel.getIsAdmin()).thenReturn(isAdmin);
Mockito.when(userModel.getState()).thenReturn(state);
Mockito.when(userModel.getSubjects()).thenReturn(new ModelsListEmpty());
return userModel;
}
use of easytests.core.models.empty.ModelsListEmpty in project easy-tests by malinink.
the class QuestionsServiceTest method createQuestionModel.
private QuestionModelInterface createQuestionModel(Integer id, String text, Integer questionTypeId, Integer topicId) {
final QuestionModelInterface questionModel = new QuestionModel();
questionModel.setId(id);
questionModel.setText(text);
questionModel.setQuestionType(new QuestionTypeModelEmpty(questionTypeId));
questionModel.setAnswers(new ModelsListEmpty());
questionModel.setTopic(new TopicModelEmpty(topicId));
return questionModel;
}
use of easytests.core.models.empty.ModelsListEmpty in project easy-tests by malinink.
the class SubjectsServiceTest method testSaveModel.
@Test
public void testSaveModel() throws Exception {
final SubjectModelInterface subjectModel = new SubjectModel();
subjectModel.setName("test111");
subjectModel.setTopics(new ModelsListEmpty());
subjectModel.setIssueStandard(new IssueStandardModelEmpty());
subjectModel.setUser(new UserModelEmpty(1));
subjectModel.setIssues(new ModelsListEmpty());
this.subjectsService.save(subjectModel);
final SubjectModelInterface foundedSubjectModel = this.subjectsService.find(subjectModel.getId());
Assert.assertEquals(subjectModel, foundedSubjectModel);
}
use of easytests.core.models.empty.ModelsListEmpty in project easy-tests by malinink.
the class IssueModel method map.
public void map(IssueEntity issueEntity) {
this.setId(issueEntity.getId());
this.setName(issueEntity.getName());
this.setSubject(new SubjectModelEmpty(issueEntity.getSubjectId()));
this.setQuizzes(new ModelsListEmpty());
}
Aggregations