use of easytests.core.options.SubjectsOptions in project easy-tests by malinink.
the class IssueStandardsServiceTest method testFindWithOptions.
@Test
public void testFindWithOptions() throws Exception {
final Integer id = 1;
final Integer subjectId = 1;
final IssueStandardModelInterface issueStandardModel = Models.createIssueStandardModel(id, 300, 30, subjectId);
final SubjectModelInterface subjectModel = Models.createSubjectModel(subjectId, "test1", "testdescription1", 2);
issueStandardModel.setSubject(subjectModel);
final IssueStandardModelInterface foundedIssueStandardModel = this.issueStandardsService.find(id, new IssueStandardsOptions().withSubject(new SubjectsOptions()));
Assert.assertEquals(issueStandardModel, foundedIssueStandardModel);
Assert.assertEquals(subjectModel, foundedIssueStandardModel.getSubject());
}
use of easytests.core.options.SubjectsOptions in project easy-tests by malinink.
the class SubjectsController method read.
@GetMapping("{id}")
public String read(@PathVariable("id") Integer id, Model model) {
final SubjectsOptionsInterface subjectsOptions = new SubjectsOptions().withIssueStandard(new IssueStandardsOptions());
final SubjectModelInterface subjectModel = getSubjectModel(id, subjectsOptions);
final SubjectDto subject = new SubjectDto();
subject.map(subjectModel);
model.addAttribute("subject", subject);
model.addAttribute("issueStandardId", subjectModel.getIssueStandard().getId());
return "subjects/view";
}
use of easytests.core.options.SubjectsOptions in project easy-tests by malinink.
the class UsersOptionsBuilderTest method testForDelete.
@Test
public void testForDelete() throws Exception {
final SubjectsOptionsInterface subjectsOptions = new SubjectsOptions();
given(this.subjectsOptionsBuilder.forDelete()).willReturn(subjectsOptions);
final UsersOptionsInterface usersOptions = this.usersOptionsBuilder.forDelete();
Assert.assertEquals(new UsersOptions().withSubjects(subjectsOptions), usersOptions);
}
Aggregations