use of org.openlmis.stockmanagement.dto.StockCardTemplateDto in project openlmis-stockmanagement by OpenLMIS.
the class StockCardTemplateServiceTest method shouldReturnNullWhenNoTemplateFound.
@Test
public void shouldReturnNullWhenNoTemplateFound() {
// when: searching for non-existing template
StockCardTemplateDto dto = stockCardTemplateService.findByProgramIdAndFacilityTypeId(UUID.randomUUID(), UUID.randomUUID());
// then
assertNull(dto);
}
use of org.openlmis.stockmanagement.dto.StockCardTemplateDto in project openlmis-stockmanagement by OpenLMIS.
the class StockCardTemplateDataBuilder method createTemplateDto.
/**
* Create template dto.
*
* @return dto.
*/
public static StockCardTemplateDto createTemplateDto() {
StockCardTemplateDto dto = new StockCardTemplateDto();
dto.setFacilityTypeId(UUID.randomUUID());
dto.setProgramId(UUID.randomUUID());
dto.getStockCardFields().add(new StockCardFieldDto("packSize", true, 123));
dto.getStockCardLineItemFields().add(new StockCardLineItemFieldDto("documentNumber", true, 456));
return dto;
}
Aggregations