public void TestForScenarioA() { var itemA = _itemFactory.GetItem("A"); itemA.Count = 1; var itemB = _itemFactory.GetItem("B"); itemB.Count = 1; var itemC = _itemFactory.GetItem("C"); itemC.Count = 1; var order = new Order(); order.OrderItems.Add(itemA); order.OrderItems.Add(itemB); order.OrderItems.Add(itemC); order = _promotionFactory.ApplyPromotion(order); var invoiceAmount = _invoiceFactory.CalculateTotalInvoiceAmount(order); Assert.AreEqual(100, invoiceAmount); }
public void TestForItemA() { var item = _itemFactory.GetItem("A"); Assert.AreEqual("A", item.SkuId); }