Search in sources :

Example 1 with ShippingRateImpl

use of org.broadleafcommerce.core.pricing.domain.ShippingRateImpl in project BroadleafCommerce by BroadleafCommerce.

the class ShippingRateDataProvider method provideBasicShippingRates.

@DataProvider(name = "basicShippingRates")
public static Object[][] provideBasicShippingRates() {
    ShippingRateImpl sr = new ShippingRateImpl();
    sr.setFeeType("SHIPPING");
    sr.setFeeSubType("ALL");
    sr.setFeeBand(1);
    sr.setBandUnitQuantity(BigDecimal.valueOf(29.99));
    sr.setBandResultQuantity(BigDecimal.valueOf(8.5));
    sr.setBandResultPercent(0);
    ShippingRateImpl sr2 = new ShippingRateImpl();
    sr2.setFeeType("SHIPPING");
    sr2.setFeeSubType("ALL");
    sr2.setFeeBand(2);
    sr2.setBandUnitQuantity(BigDecimal.valueOf(999999.99));
    sr2.setBandResultQuantity(BigDecimal.valueOf(8.5));
    sr2.setBandResultPercent(0);
    return new Object[][] { { sr, sr2 } };
}
Also used : ShippingRateImpl(org.broadleafcommerce.core.pricing.domain.ShippingRateImpl) DataProvider(org.testng.annotations.DataProvider)

Example 2 with ShippingRateImpl

use of org.broadleafcommerce.core.pricing.domain.ShippingRateImpl in project BroadleafCommerce by BroadleafCommerce.

the class CommonSetupBaseTest method createShippingRates.

public void createShippingRates() {
    ShippingRate sr = new ShippingRateImpl();
    sr.setFeeType("SHIPPING");
    sr.setFeeSubType("ALL");
    sr.setFeeBand(1);
    sr.setBandUnitQuantity(BigDecimal.valueOf(29.99));
    sr.setBandResultQuantity(BigDecimal.valueOf(8.5));
    sr.setBandResultPercent(0);
    ShippingRate sr2 = new ShippingRateImpl();
    sr2.setFeeType("SHIPPING");
    sr2.setFeeSubType("ALL");
    sr2.setFeeBand(2);
    sr2.setBandUnitQuantity(BigDecimal.valueOf(999999.99));
    sr2.setBandResultQuantity(BigDecimal.valueOf(8.5));
    sr2.setBandResultPercent(0);
    shippingRateService.save(sr);
    shippingRateService.save(sr2);
}
Also used : ShippingRate(org.broadleafcommerce.core.pricing.domain.ShippingRate) ShippingRateImpl(org.broadleafcommerce.core.pricing.domain.ShippingRateImpl)

Aggregations

ShippingRateImpl (org.broadleafcommerce.core.pricing.domain.ShippingRateImpl)2 ShippingRate (org.broadleafcommerce.core.pricing.domain.ShippingRate)1 DataProvider (org.testng.annotations.DataProvider)1