コード例 #1
0
 public void PommesBuy2Save50PenceSo50PenceDiscountIsReturned()
 {
     var subject = new DiscountService();
     subject.PriceAdjustment("Mele");
     var result = subject.PriceAdjustment("Mele");
     Assert.That(result, Is.EqualTo(50));
 }
コード例 #2
0
 public void CherriesBuy2Save20PenceSo20PenceDiscountIsReturned()
 {
     var subject = new DiscountService();
     subject.PriceAdjustment("Cherries");
     var result = subject.PriceAdjustment("Cherries");
     Assert.That(result, Is.EqualTo(20));
 }
コード例 #3
0
 public void BananasBuy1Get1FreeSo150PenceDiscountIsReturned()
 {
     var subject = new DiscountService();
     subject.PriceAdjustment("Bananas");
     var result = subject.PriceAdjustment("Bananas");
     Assert.That(result, Is.EqualTo(150));
 }
コード例 #4
0
 public void PommesBuy3Save1PoundSo100PenceDiscountIsReturned()
 {
     var subject = new DiscountService();
     subject.PriceAdjustment("Pommes");
     subject.PriceAdjustment("Pommes");
     var result = subject.PriceAdjustment("Pommes");
     Assert.That(result, Is.EqualTo(100));
 }
コード例 #5
0
 public void FruitBuyAny5Save2PoundSo200PenceDiscountIsReturned()
 {
     var subject = new DiscountService();
     subject.PriceAdjustment("Bananas");
     subject.PriceAdjustment("Cherries");
     subject.PriceAdjustment("Pommes");
     subject.PriceAdjustment("Mele");
     var result = subject.PriceAdjustment("Apples");
     Assert.That(result, Is.EqualTo(200));
 }