public void Check_Three_Milks_Same_As_Four_Test() { Butter butter = new Butter(0, 0.80M); Bread bread = new Bread(0, 1.00M, butter); Milk milk = new Milk(3, 1.15M); var actual_3Milks = butter.GetOffers() + bread.GetOffers() + milk.GetOffers(); milk.Count = 4; var actual_4Milks = butter.GetOffers() + bread.GetOffers() + milk.GetOffers(); Assert.Equal(actual_3Milks, actual_4Milks); }
public void Butter_Basic_Test() { Butter butter = new Butter(1, 1.0M); var actual = butter.GetOffers(); Assert.Equal(1.0M, actual); }
public void Check_Four_Butter_Two_Bread_Offer_Test() { Butter butter = new Butter(4, 0.80M); Bread bread = new Bread(2, 1.00M, butter); var actual = bread.GetOffers() + butter.GetOffers(); Assert.Equal(4.20M, actual); }
public void Check_Three_Butter_Zero_Bread_Offer_Test() { Butter butter = new Butter(3, 0.80M); Bread bread = new Bread(0, 1.00M, butter); var actual = bread.GetOffers() + butter.GetOffers(); Assert.Equal(2.40M, actual); }
public void Scenario_3_Test() { Butter butter = new Butter(0, 0.80M); Bread bread = new Bread(0, 1.00M, butter); Milk milk = new Milk(4, 1.15M); var actual = butter.GetOffers() + bread.GetOffers() + milk.GetOffers(); Assert.Equal(3.45M, actual); }