public void GetCostTest_1本第1_2_3_4_5集_375元() { List <IHarryPotterBook> books = new List <IHarryPotterBook> { new HarryPotterBook1 { count = 1 }, new HarryPotterBook2 { count = 1 }, new HarryPotterBook3 { count = 1 }, new HarryPotterBook4 { count = 1 }, new HarryPotterBook5 { count = 1 } }; HarryPotter target = new HarryPotter(); decimal expected = 375; var actual = target.GetCost(books); Assert.AreEqual(expected, actual); }
public void GetCostTest_1本第1集_100元() { List <IHarryPotterBook> books = new List <IHarryPotterBook> { new HarryPotterBook1 { count = 1 } }; HarryPotter target = new HarryPotter(); decimal expected = 100; var actual = target.GetCost(books); Assert.AreEqual(expected, actual); }