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);
}
Aggregations