use of org.openlmis.stockmanagement.testutils.ValidReasonAssignmentDataBuilder in project openlmis-stockmanagement by OpenLMIS.
the class ValidReasonAssignmentDtoBuilderTest method shouldBuildDtoWithProperServiceUrls.
@Test
public void shouldBuildDtoWithProperServiceUrls() {
ValidReasonAssignment assignment = new ValidReasonAssignmentDataBuilder().build();
ValidReasonAssignmentDto dto = dtoBuilder.build(assignment);
assertValidReasonAssignmentDto(assignment, dto);
}
use of org.openlmis.stockmanagement.testutils.ValidReasonAssignmentDataBuilder in project openlmis-stockmanagement by OpenLMIS.
the class ValidReasonAssignmentDtoBuilderTest method shouldBuildListOfDtosWithProperServiceUrls.
@Test
public void shouldBuildListOfDtosWithProperServiceUrls() {
ValidReasonAssignment assignment = new ValidReasonAssignmentDataBuilder().build();
ValidReasonAssignment assignment2 = new ValidReasonAssignmentDataBuilder().withFacilityType(UUID.randomUUID()).withProgram(UUID.randomUUID()).build();
List<ValidReasonAssignmentDto> dtos = dtoBuilder.build(Lists.newArrayList(assignment, assignment2));
assertEquals(2, dtos.size());
assertValidReasonAssignmentDto(assignment, dtos.get(0));
assertValidReasonAssignmentDto(assignment2, dtos.get(1));
}
Aggregations