Package de.hybris.platform.order
Class UntaxedEntriesCalculationTest
- java.lang.Object
-
- de.hybris.platform.testframework.HybrisJUnit4Test
-
- de.hybris.platform.servicelayer.ServicelayerBaseTest
-
- de.hybris.platform.servicelayer.ServicelayerTest
-
- de.hybris.platform.order.UntaxedEntriesCalculationTest
-
- All Implemented Interfaces:
JaloSessionHolder
@IntegrationTest public class UntaxedEntriesCalculationTest extends ServicelayerTest
Tests different abstract order entries with mixed taxes, see PLA-11851.
-
-
Field Summary
-
Fields inherited from class de.hybris.platform.servicelayer.ServicelayerTest
importService
-
Fields inherited from class de.hybris.platform.testframework.HybrisJUnit4Test
jaloSession
-
-
Constructor Summary
Constructors Constructor Description UntaxedEntriesCalculationTest()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidsetUp()voidtearDown()voidtestGrossMixedTaxEntries()Test gross mixed tax for different entries: creates 2 taxes: 10% and 20%, creates 2 product tax group with 10% and 20% as well, add product01 (110 Euro gross) including 10% tax ==> 100(net) + 10(tax) = 110 Euro, add product02 (240 Euro gross) including 20% tax ==> 200(net) + 40(tax) = 240 Euro, add product03 (300 Euro gross) with NO tax ==> 300(net) = 300 Euro, delivery cost is 10 Euro gross, checks that the sub total (gross) is 650,(110 + 240 + 300) checks that 10% tax has value 10.29 and 20% tax has value 41.14.voidtestGrossNormalTaxEntries()voidtestNetMixedTaxEntries()Test net mixed tax for different entries: creates 2 taxes: 10% and 20%, creates 2 product tax group with 10% and 20% as well, add product41 (110 Euro net) with extra 10% tax ==> 110(net) + 11(tax) = 121 Euro, add product42 (240 Euro net) with extra 20% tax ==> 240(net) + 44(tax) = 288 Euro, add product43 (300 Euro net) with NO tax ==> 300(net) = 300 Euro, delivery cost is 10 Euro net, checks that the sub total (net) is 650,(110 + 240 + 300) checks that 10% tax has value 10.31 and 20% tax has value 49.37.voidtestNetNormalTaxEntries()-
Methods inherited from class de.hybris.platform.servicelayer.ServicelayerTest
createCoreData, createDefaultCatalog, createDefaultUsers, createHardwareCatalog, getApplicationContext, importCsv, importData, importData, importData, importStream, importStream, isPrefetchModeNone
-
Methods inherited from class de.hybris.platform.servicelayer.ServicelayerBaseTest
autowireProperties, getBeanName, prepareApplicationContextAndSession
-
Methods inherited from class de.hybris.platform.testframework.HybrisJUnit4Test
establishJaloSession, finish, getOrCreateCurrency, getOrCreateLanguage, init, intenseChecksActivated, takeJaloSession
-
-
-
-
Method Detail
-
setUp
public void setUp() throws java.lang.Exception- Throws:
java.lang.Exception
-
tearDown
public void tearDown()
-
testGrossMixedTaxEntries
public void testGrossMixedTaxEntries() throws CalculationException, JaloPriceFactoryExceptionTest gross mixed tax for different entries:- creates 2 taxes: 10% and 20%,
- creates 2 product tax group with 10% and 20% as well,
- add product01 (110 Euro gross) including 10% tax ==> 100(net) + 10(tax) = 110 Euro,
- add product02 (240 Euro gross) including 20% tax ==> 200(net) + 40(tax) = 240 Euro,
- add product03 (300 Euro gross) with NO tax ==> 300(net) = 300 Euro,
- delivery cost is 10 Euro gross,
- checks that the sub total (gross) is 650,(110 + 240 + 300)
- checks that 10% tax has value 10.29 and 20% tax has value 41.14.
-
testGrossNormalTaxEntries
public void testGrossNormalTaxEntries() throws CalculationException, JaloPriceFactoryException
-
testNetMixedTaxEntries
public void testNetMixedTaxEntries() throws CalculationException, JaloPriceFactoryExceptionTest net mixed tax for different entries:- creates 2 taxes: 10% and 20%,
- creates 2 product tax group with 10% and 20% as well,
- add product41 (110 Euro net) with extra 10% tax ==> 110(net) + 11(tax) = 121 Euro,
- add product42 (240 Euro net) with extra 20% tax ==> 240(net) + 44(tax) = 288 Euro,
- add product43 (300 Euro net) with NO tax ==> 300(net) = 300 Euro,
- delivery cost is 10 Euro net,
- checks that the sub total (net) is 650,(110 + 240 + 300)
- checks that 10% tax has value 10.31 and 20% tax has value 49.37.
-
testNetNormalTaxEntries
public void testNetNormalTaxEntries() throws CalculationException, JaloPriceFactoryException
-
-