CustomerOrderDeliveryDetEntity implements org.yes.cart.domain.entity.CustomerOrderDeliveryDet, java.io.Serializable { @Override public boolean isDeliveryRejected() { return this.deliveredQuantity != null && this.deliveredQuantity.compareTo(BigDecimal.ZERO) == 0; } CustomerOrderDeliveryDetEntity(); @Override BigDecimal getQty(); @Override void setQty(final BigDecimal qty); @Override BigDecimal getPrice(); @Override void setPrice(final BigDecimal price); @Override BigDecimal getNetPrice(); @Override void setNetPrice(final BigDecimal netPrice); @Override BigDecimal getGrossPrice(); @Override void setGrossPrice(final BigDecimal grossPrice); @Override BigDecimal getTaxRate(); @Override void setTaxRate(final BigDecimal taxRate); @Override String getTaxCode(); @Override void setTaxCode(final String taxCode); @Override boolean isTaxExclusiveOfPrice(); @Override void setTaxExclusiveOfPrice(final boolean taxExclusiveOfPrice); @Override String getProductSkuCode(); @Override void setProductSkuCode(final String productSkuCode); @Override String getProductName(); @Override void setProductName(final String productName); @Override String getSupplierCode(); @Override void setSupplierCode(final String supplierCode); @Override String getItemGroup(); void setItemGroup(final String itemGroup); @Override String getDeliveryGroup(); @Override DeliveryBucket getDeliveryBucket(); @Override String getDeliveryRemarks(); @Override void setDeliveryRemarks(final String deliveryRemarks); @Override LocalDateTime getDeliveryEstimatedMin(); @Override void setDeliveryEstimatedMin(final LocalDateTime deliveryEstimatedMin); @Override LocalDateTime getDeliveryEstimatedMax(); @Override void setDeliveryEstimatedMax(final LocalDateTime deliveryEstimatedMax); @Override LocalDateTime getDeliveryGuaranteed(); @Override void setDeliveryGuaranteed(final LocalDateTime deliveryGuaranteed); @Override LocalDateTime getDeliveryConfirmed(); @Override void setDeliveryConfirmed(final LocalDateTime deliveryConfirmed); @Override BigDecimal getDeliveredQuantity(); @Override void setDeliveredQuantity(final BigDecimal deliveredQuantity); @Override boolean isDeliveryRejected(); @Override boolean isDeliveryDifferent(); @Override String getB2bRemarks(); @Override void setB2bRemarks(final String b2bRemarks); @Override String getSupplierInvoiceNo(); @Override void setSupplierInvoiceNo(final String supplierInvoiceNo); @Override LocalDate getSupplierInvoiceDate(); @Override void setSupplierInvoiceDate(final LocalDate supplierInvoiceDate); @Override CustomerOrderDelivery getDelivery(); @Override void setDelivery(final CustomerOrderDelivery delivery); @Override Instant getCreatedTimestamp(); @Override void setCreatedTimestamp(final Instant createdTimestamp); @Override Instant getUpdatedTimestamp(); @Override void setUpdatedTimestamp(final Instant updatedTimestamp); @Override String getCreatedBy(); @Override void setCreatedBy(final String createdBy); @Override String getUpdatedBy(); @Override void setUpdatedBy(final String updatedBy); @Override String getGuid(); @Override void setGuid(final String guid); @Override long getCustomerOrderDeliveryDetId(); @Override BigDecimal getSalePrice(); @Override void setSalePrice(final BigDecimal salePrice); @Override BigDecimal getListPrice(); @Override void setListPrice(final BigDecimal listPrice); @Override boolean isNotSoldSeparately(); @Override void setNotSoldSeparately(final boolean notSoldSeparately); @Override boolean isConfigurable(); @Override void setConfigurable(final boolean configurable); @Override boolean isGift(); @Override void setGift(final boolean gift); @Override boolean isPromoApplied(); @Override void setPromoApplied(final boolean promoApplied); @Override boolean isFixedPrice(); @Override void setFixedPrice(final boolean fixedPrice); @Override String getAppliedPromo(); @Override void setAppliedPromo(final String appliedPromo); String getStoredAttributesInternal(); void setStoredAttributesInternal(final String storedAttributesInternal); @Override Pair<String, I18NModel> getValue(final String code); @Override void putValue(final String code, final String value, final I18NModel displayValue); @Override Map<String, Pair<String, I18NModel>> getAllValues(); @Override void setAllValues(final Map<String, Pair<String, I18NModel>> allValues); @Override long getId(); @Override void setCustomerOrderDeliveryDetId(final long customerOrderDeliveryDetId); @Override long getVersion(); void setVersion(final long version);  }
@Test public void testIsDeliveryRejected() throws Exception { final CustomerOrderDeliveryDetEntity entity = new CustomerOrderDeliveryDetEntity(); assertFalse(entity.isDeliveryRejected()); entity.setDeliveredQuantity(BigDecimal.ZERO); assertTrue(entity.isDeliveryRejected()); entity.setDeliveredQuantity(BigDecimal.ONE); assertFalse(entity.isDeliveryRejected()); }