public void ParseTestListVar2() { float sum = 0; DummyCart dummyCart = new DummyCart(); var listItems = dummyCart.Generate0Promotion3(); PromotionType3 promotionType3 = new PromotionType3(); var cost = promotionType3.Parse(listItems); Assert.AreEqual(sum, cost); Assert.AreEqual(2, listItems.Count()); }
public void ParseTest() { float sum = 30; DummyCart dummyCart = new DummyCart(); var listItems = dummyCart.Generate(); PromotionType3 promotionType3 = new PromotionType3(); var cost = promotionType3.Parse(listItems); Assert.AreEqual(sum, cost); Assert.AreEqual(3, listItems.Count()); Assert.AreEqual(2, listItems.Where(t => t.sKU.GetType() == typeof(SKU_C)).FirstOrDefault().count); }