示例#1
0
        public void GetSubTotalValueTest_EC_NoItemtotalList_0_0()
        {
            CheckoutTotalsDetailed_SAM target = new CheckoutTotalsDetailed_SAM();
            OrderTotals_V01            totals = new OrderTotals_V01();

            totals.ChargeList     = new ChargeList();
            totals.ItemTotalsList = new ItemTotalsList();

            string  countryCode = "EC";
            decimal expected    = 0M;
            decimal actual;

            actual = target.GetSubTotalValue(totals, countryCode);
            Assert.AreEqual(expected, actual);
        }
示例#2
0
        public void GetSubTotalValueTest_EC_NochargeList_90_90()
        {
            CheckoutTotalsDetailed_SAM target = new CheckoutTotalsDetailed_SAM();
            OrderTotals_V01            totals = new OrderTotals_V01();

            totals.ChargeList = new ChargeList();

            totals.ItemTotalsList = new ItemTotalsList();
            totals.ItemTotalsList.Add(new ItemTotal_V01("0020", 1, 120, 100, 90, 5, 50, null));

            string  countryCode = "EC";
            decimal expected    = 90M;
            decimal actual;

            actual = target.GetSubTotalValue(totals, countryCode);
            Assert.AreEqual(expected, actual);
        }
示例#3
0
        public void GetSubTotalValueTest_EC_NoPH_NoFreight_80_80()
        {
            CheckoutTotalsDetailed_SAM target = new CheckoutTotalsDetailed_SAM();
            OrderTotals_V01            totals = new OrderTotals_V01();

            totals.ChargeList = new ChargeList();
            totals.ChargeList.Add(new Charge_V01(ChargeTypes.PH, 0M));
            totals.ChargeList.Add(new Charge_V01(ChargeTypes.FREIGHT, 0M));

            totals.ItemTotalsList = new ItemTotalsList();
            totals.ItemTotalsList.Add(new ItemTotal_V01("0020", 1, 120, 100, 80, 5, 50, null));

            string  countryCode = "EC";
            decimal expected    = 80M;
            decimal actual;

            actual = target.GetSubTotalValue(totals, countryCode);
            Assert.AreEqual(expected, actual);
        }