use of org.openlmis.stockmanagement.dto.StockEventDto in project openlmis-stockmanagement by OpenLMIS.
the class StockEventDtoDataBuilder method createStockEventDto.
/**
* Create stock event dto object for testing.
*
* @return created dto object.
*/
public static StockEventDto createStockEventDto() {
StockEventDto stockEventDto = new StockEventDto();
stockEventDto.setDocumentNumber("c");
stockEventDto.setSignature("e");
stockEventDto.setProgramId(UUID.randomUUID());
stockEventDto.setFacilityId(UUID.randomUUID());
StockEventLineItemDto eventLineItemDto = createStockEventLineItem();
stockEventDto.setLineItems(singletonList(eventLineItemDto));
return stockEventDto;
}
use of org.openlmis.stockmanagement.dto.StockEventDto in project openlmis-stockmanagement by OpenLMIS.
the class StockEventDtoDataBuilder method createNoSourceDestinationStockEventDto.
/**
* Create stock event dto object without source and destination for testing.
*
* @return created dto object.
*/
public static StockEventDto createNoSourceDestinationStockEventDto() {
StockEventDto stockEventDto = createStockEventDto();
StockEventLineItemDto stockEventLineItem = stockEventDto.getLineItems().get(0);
stockEventLineItem.setSourceId(null);
stockEventLineItem.setDestinationId(null);
stockEventLineItem.setSourceFreeText(null);
stockEventLineItem.setDestinationFreeText(null);
return stockEventDto;
}
Aggregations