use of org.openlmis.stockmanagement.dto.ValidReasonAssignmentDto in project openlmis-stockmanagement by OpenLMIS.
the class ValidReasonAssignmentDtoBuilderTest method shouldReturnNullIfNullIsPassedToBuildDto.
@Test
public void shouldReturnNullIfNullIsPassedToBuildDto() {
ValidReasonAssignmentDto dto = dtoBuilder.build((ValidReasonAssignment) null);
assertNull(dto);
}
use of org.openlmis.stockmanagement.dto.ValidReasonAssignmentDto 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