public void Calculate_Cart_List() { Product p1 = new Product { Name = "P1", ProductID = 1 , Price = 100M}; Product p2 = new Product { Name = "P2", ProductID = 2, Price = 50M }; CartRepository target = new CartRepository(); target.AddItem(p1, 2); target.AddItem(p2, 3); var result = target.ComputeTotalValue(); Assert.AreEqual(result, new decimal(100 * 2 + 50 * 3)); }