Class UntaxedEntriesCalculationTest

    • Constructor Detail

      • UntaxedEntriesCalculationTest

        public UntaxedEntriesCalculationTest()
    • Method Detail

      • setUp

        public void setUp()
                   throws java.lang.Exception
        Throws:
        java.lang.Exception
      • tearDown

        public void tearDown()
      • testGrossMixedTaxEntries

        public void testGrossMixedTaxEntries()
                                      throws CalculationException,
                                             JaloPriceFactoryException
        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.
        Throws:
        JaloPriceFactoryException
        CalculationException
      • testNetMixedTaxEntries

        public void testNetMixedTaxEntries()
                                    throws CalculationException,
                                           JaloPriceFactoryException
        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.
        Throws:
        JaloPriceFactoryException
        CalculationException