@Test public void shouldThrowErrorIfProductCodeIsMissing() throws Exception { ShipmentLineItemDTO shipmentLineItemDTO = new ShipmentLineItemDTO( orderNumber , Long.parseLong(orderId), concatenatedOrderId, facilityCode, programCode, null, quantityOrdered, substitutedProductCode, quantityShipped, cost, substitutedProductCode, substitutedProductName, substitutedProductQuantityShipped, packSize, packedDate, shippedDate ); expectedException.expect(DataException.class); expectedException.expectMessage("error.mandatory.fields.missing"); shipmentLineItemDTO.checkMandatoryFields(); }
public void checkMandatoryFields() { if (isBlank(this.productCode) || isBlank(this.orderNumber) || isBlank(this.quantityShipped)) { throw new DataException("error.mandatory.fields.missing"); } }
ShipmentLineItemDTO { public void checkMandatoryFields() { if (isBlank(this.productCode) || isBlank(this.orderNumber) || isBlank(this.quantityShipped)) { throw new DataException("error.mandatory.fields.missing"); } } }
ShipmentLineItemDTO { public void checkMandatoryFields() { if (isBlank(this.productCode) || isBlank(this.orderNumber) || isBlank(this.quantityShipped)) { throw new DataException("error.mandatory.fields.missing"); } } ShipmentLineItemDTO(String orderNumber, String productCode, String replacedProductCode, String quantityShipped,
                             String cost, String packedDate, String shippedDate); }
ShipmentLineItemDTO { public void checkMandatoryFields() { if (isBlank(this.productCode) || isBlank(this.orderNumber) || isBlank(this.quantityShipped)) { throw new DataException("error.mandatory.fields.missing"); } } ShipmentLineItemDTO(String orderNumber, String productCode, String replacedProductCode, String quantityShipped,
                             String cost, String packedDate, String shippedDate); void checkMandatoryFields(); static ShipmentLineItemDTO populate(List<String> fieldsInOneRow,
                                             Collection<EDIFileColumn> shipmentFileColumns); }
ShipmentLineItemDTO { public void checkMandatoryFields() { if (isBlank(this.productCode) || isBlank(this.orderNumber) || isBlank(this.quantityShipped)) { throw new DataException("error.mandatory.fields.missing"); } } ShipmentLineItemDTO(String orderNumber, String productCode, String replacedProductCode, String quantityShipped,
                             String cost, String packedDate, String shippedDate); void checkMandatoryFields(); static ShipmentLineItemDTO populate(List<String> fieldsInOneRow,
                                             Collection<EDIFileColumn> shipmentFileColumns);  }