示例#1
0
        public void When_shipping_via_UPS_The_shipping_cost_is_425()
        {
            var strategy = new UpsShippingCostStrategy();
            var shippingCalculatorService = new ShippingCostCalculatorService(strategy);
            var order = TestInit.CreateOrder_UPS();
            var cost  = shippingCalculatorService.CalculateShippingCost(order);

            Assert.Equal(4.25d, cost);
        }
示例#2
0
        public void When_shipping_via_FedEx_The_shipping_cost_is_5()
        {
            var strategy = new FedExShippingCostStrategy();
            var shippingCalculatorService = new ShippingCostCalculatorService(strategy);
            var order = TestInit.CreateOrder_FedEx();
            var cost  = shippingCalculatorService.CalculateShippingCost(order);

            Assert.Equal(5.00d, cost);
        }