Search in sources :

Example 1 with ValidReasonAssignmentDataBuilder

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);
}
Also used : ValidReasonAssignmentDataBuilder(org.openlmis.stockmanagement.testutils.ValidReasonAssignmentDataBuilder) ValidReasonAssignment(org.openlmis.stockmanagement.domain.reason.ValidReasonAssignment) ValidReasonAssignmentDto(org.openlmis.stockmanagement.dto.ValidReasonAssignmentDto) Test(org.junit.Test)

Example 2 with ValidReasonAssignmentDataBuilder

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));
}
Also used : ValidReasonAssignmentDataBuilder(org.openlmis.stockmanagement.testutils.ValidReasonAssignmentDataBuilder) ValidReasonAssignment(org.openlmis.stockmanagement.domain.reason.ValidReasonAssignment) ValidReasonAssignmentDto(org.openlmis.stockmanagement.dto.ValidReasonAssignmentDto) Test(org.junit.Test)

Aggregations

Test (org.junit.Test)2 ValidReasonAssignment (org.openlmis.stockmanagement.domain.reason.ValidReasonAssignment)2 ValidReasonAssignmentDto (org.openlmis.stockmanagement.dto.ValidReasonAssignmentDto)2 ValidReasonAssignmentDataBuilder (org.openlmis.stockmanagement.testutils.ValidReasonAssignmentDataBuilder)2