public void Buy_1_Different_And_2_PairBook_Is_Duplicate_HarryPotterBooks_Is_NT460() { var shoppingCart = new List <Books>() { new Books() { Name = "HarryPotter1" }, new Books() { Name = "HarryPotter2" }, new Books() { Name = "HarryPotter2" }, new Books() { Name = "HarryPotter3" }, new Books() { Name = "HarryPotter3" } }; var target = new HarryPotterSeries(shoppingCart); var actual = target.GetPrice(); var expected = 460; Assert.AreEqual(expected, actual); }
public void Buy_4_Different_HarryPotterBooks_Is_NT320() { var shoppingCart = new List <Books>() { new Books() { Name = "HarryPotter1" }, new Books() { Name = "HarryPotter2" }, new Books() { Name = "HarryPotter3" }, new Books() { Name = "HarryPotter4" } }; var target = new HarryPotterSeries(shoppingCart); var actual = target.GetPrice(); var expected = 320; Assert.AreEqual(expected, actual); }
public void Buy_Complete_Series_HarryPotterBooks_Is_NT375() { var shoppingCart = new List <Books>() { new Books() { Name = "HarryPotter1" }, new Books() { Name = "HarryPotter2" }, new Books() { Name = "HarryPotter3" }, new Books() { Name = "HarryPotter4" }, new Books() { Name = "HarryPotter5" } }; var target = new HarryPotterSeries(shoppingCart); var actual = target.GetPrice(); var expected = 375; Assert.AreEqual(expected, actual); }
public void Buy_1_HarryPotterBook_Is_NT100() { var shoppingCart = new List <Books>() { new Books() { Name = "HarryPotter1" }, }; var target = new HarryPotterSeries(shoppingCart); var actual = target.GetPrice(); var expected = 100; Assert.AreEqual(expected, actual); }