Search in sources :

Example 6 with StockCardFieldDto

use of org.openlmis.stockmanagement.dto.StockCardFieldDto 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;
}
Also used : StockCardTemplateDto(org.openlmis.stockmanagement.dto.StockCardTemplateDto) StockCardLineItemFieldDto(org.openlmis.stockmanagement.dto.StockCardLineItemFieldDto) StockCardFieldDto(org.openlmis.stockmanagement.dto.StockCardFieldDto)

Aggregations

StockCardFieldDto (org.openlmis.stockmanagement.dto.StockCardFieldDto)6 StockCardTemplateDto (org.openlmis.stockmanagement.dto.StockCardTemplateDto)5 Test (org.junit.Test)3 StockCardLineItemFieldDto (org.openlmis.stockmanagement.dto.StockCardLineItemFieldDto)3 SpringBootTest (org.springframework.boot.test.context.SpringBootTest)3 UUID (java.util.UUID)1 ValidationMessageException (org.openlmis.stockmanagement.exception.ValidationMessageException)1 Message (org.openlmis.stockmanagement.util.Message)1