示例#1
0
        public void TestHappyPathForOrderTaxAmount()
        {
            var testOrder        = MockOrderInfo.GetOrderForTest();
            var orderTaxResponse = _taxServicecontroller.CalculateSalesTaxForOrder(testOrder);

            Assert.AreEqual(orderTaxResponse, 21000.70F);

            Assert.AreEqual(_taxServicecontroller.Response.StatusCode, 200);
        }
示例#2
0
        public void TestMinReqsCheckForOrderTax()
        {
            var testOrder = MockOrderInfo.GetOrderForTest();

            testOrder.ShipFrom.Country          = null;
            testOrder.ShipFrom.Zip              = "";
            testOrder.Customer.Location.Country = null;
            testOrder.Customer.Location.Zip     = null;
            testOrder.ShipToOverride.Country    = null;
            testOrder.ShipToOverride.Zip        = null;
            var orderTaxResponse = _taxServicecontroller.CalculateSalesTaxForOrder(testOrder);

            Assert.AreEqual(orderTaxResponse, 0);

            Assert.AreNotEqual(_taxServicecontroller.Response.StatusCode, 200);
        }