use of org.openlmis.stockmanagement.domain.reason.ValidReasonAssignment 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));
}
use of org.openlmis.stockmanagement.domain.reason.ValidReasonAssignment in project openlmis-stockmanagement by OpenLMIS.
the class ValidReasonAssignmentDataBuilder method build.
/**
* Creates new instance of {@link ValidReasonAssignment} with properties.
* @return created valid reason assignment.
*/
public ValidReasonAssignment build() {
ValidReasonAssignment assignment = new ValidReasonAssignment(programId, facilityTypeId, hidden, reason);
assignment.setId(id);
return assignment;
}
Aggregations