예제 #1
0
        public void TestShippingCosts()
        {
            var clazz = new DetermineShippingCosts();

            Assert.AreEqual(0, clazz.ShippingCosts(false, "Ground", 300));
            Assert.AreEqual(100, clazz.ShippingCosts(true, "Ground", 300));
            Assert.AreEqual(125, clazz.ShippingCosts(true, "SecondDayAir", 1401));
            Assert.AreEqual(0, clazz.ShippingCosts(true, "SecondDayAir", 1501));
            Assert.AreEqual(0, clazz.ShippingCosts(false, "fsdfsdfsdf", 300));
            Assert.AreEqual(50, clazz.ShippingCosts(true, "InStore", 300));
            Assert.AreEqual(250, clazz.ShippingCosts(true, "NextDayAir", 300));
            Assert.AreEqual(0, clazz.ShippingCosts(true, "NextDayAir", 1600));
        }
        public void when_no_calculation_is_needed_return_0()
        {
            double result = determineShippingCosts.ShippingCosts(false, "", 1.1);

            Assert.AreEqual(0, result);
        }