public void When_PremiumClient_Expect_15PercentDiscount() { Client premiumClient = new Client { ClientId = 1, ClientName = "Marek", ClientType = ClientType.Premium }; Order order = new Order { OrderId = 1, ProductId = 212, ProductQuantity = 1, Amount = 1000 }; SpecyficOrders customerOrderService = new SpecyficOrders(); customerOrderService.ApplyDiscount(premiumClient, order); NUnit.Framework.Assert.AreEqual(order.Amount, 850); }
public void Special_Expect_30PercentDiscount() { Client specialClient = new Client { ClientId = 3, ClientName = "John", ClientType = ClientType.Special }; Order order = new Order { OrderId = 3, ProductId = 2, ProductQuantity = 1, Amount = 10000 }; SpecyficOrders clientOrderService = new SpecyficOrders(); clientOrderService.ApplyDiscount(specialClient, order); NUnit.Framework.Assert.AreEqual(order.Amount, 7000); }