Search in sources :

Example 1 with SupportedProgramDto

use of org.openlmis.stockmanagement.dto.referencedata.SupportedProgramDto in project openlmis-stockmanagement by OpenLMIS.

the class HomeFacilityPermissionServiceTest method mockFacilityDto.

private void mockFacilityDto() {
    homeFacilityDto = mock(FacilityDto.class);
    SupportedProgramDto supportedProgramDto = new SupportedProgramDto();
    supportedProgramDto.setId(programId);
    when(homeFacilityDto.getSupportedPrograms()).thenReturn(Collections.singletonList(supportedProgramDto));
    FacilityTypeDto facilityTypeDto = new FacilityTypeDto();
    facilityTypeDto.setId(facilityTypeId);
    when(homeFacilityDto.getType()).thenReturn(facilityTypeDto);
    when(facilityService.findOne(homeFacilityId)).thenReturn(homeFacilityDto);
}
Also used : SupportedProgramDto(org.openlmis.stockmanagement.dto.referencedata.SupportedProgramDto) FacilityTypeDto(org.openlmis.stockmanagement.dto.referencedata.FacilityTypeDto) FacilityDto(org.openlmis.stockmanagement.dto.referencedata.FacilityDto)

Aggregations

FacilityDto (org.openlmis.stockmanagement.dto.referencedata.FacilityDto)1 FacilityTypeDto (org.openlmis.stockmanagement.dto.referencedata.FacilityTypeDto)1 SupportedProgramDto (org.openlmis.stockmanagement.dto.referencedata.SupportedProgramDto)1