Search in sources :

Example 16 with StockEventLineItemDto

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

Aggregations

StockEventLineItemDto (org.openlmis.stockmanagement.dto.StockEventLineItemDto)16 StockEventDto (org.openlmis.stockmanagement.dto.StockEventDto)8 UUID (java.util.UUID)5 Test (org.junit.Test)4 StockCard (org.openlmis.stockmanagement.domain.card.StockCard)3 StockEventDtoDataBuilder.createStockEventDto (org.openlmis.stockmanagement.testutils.StockEventDtoDataBuilder.createStockEventDto)3 UUID.randomUUID (java.util.UUID.randomUUID)2 StockCardLineItem (org.openlmis.stockmanagement.domain.card.StockCardLineItem)2 OrderableLotIdentity (org.openlmis.stockmanagement.domain.identity.OrderableLotIdentity)2 Lists (com.google.common.collect.Lists)1 ZonedDateTime (java.time.ZonedDateTime)1 Collection (java.util.Collection)1 Collections.singletonList (java.util.Collections.singletonList)1 HashSet (java.util.HashSet)1 List (java.util.List)1 Set (java.util.Set)1 NotNull (javax.validation.constraints.NotNull)1 CollectionUtils.isEmpty (org.apache.commons.collections4.CollectionUtils.isEmpty)1 StockCard.createStockCardFrom (org.openlmis.stockmanagement.domain.card.StockCard.createStockCardFrom)1 StockCardLineItem.createLineItemFrom (org.openlmis.stockmanagement.domain.card.StockCardLineItem.createLineItemFrom)1