AsgQuizzes.Tests.OrderTest.TestDiscountAppliedAndSavedInRepository C# (CSharp) Метод

TestDiscountAppliedAndSavedInRepository() приватный Метод

private TestDiscountAppliedAndSavedInRepository ( ) : void
Результат void
        public void TestDiscountAppliedAndSavedInRepository()
        {
            var orderId = Guid.NewGuid();

            // HINT: Some dependency missing here?
            var orderController = new OrderController(null);

            var originalTotal = orderController.GetById(orderId).TotalPrice;
            var modifiedTotal = orderController.ApplyDiscount(orderId, 10m).TotalPrice;
            Assert.AreEqual(originalTotal*0.9m, modifiedTotal);
        }