コード例 #1
0
 public void TestNoDiscount()
 {
     Discount discountPrice = new Discount();
     double result = discountPrice.calculateDiscount(500);
     Assert.AreEqual(500, result);
 }
コード例 #2
0
 public void TestExceptionwithCero()
 {
     Discount discountPrice = new Discount();
     discountPrice.calculateDiscount(0);
     Assert.Fail("ArgumentException");
 }
コード例 #3
0
 public void TestDiscountPriceFivePercent()
 {
     Discount discountPrice = new Discount();
     double result = discountPrice.calculateDiscount(1900);
     Assert.AreEqual(1805, result);
 }
コード例 #4
0
 public void TestDiscountPriceTenPercent()
 {
     Discount discountPrice = new Discount();
     double result = discountPrice.calculateDiscount(2000);
     Assert.AreEqual(1800, result);
 }
コード例 #5
0
 public void TestDiscountPricefiftyPercent()
 {
     Discount discountPrice = new Discount();
     double result = discountPrice.calculateDiscount(5500);
     Assert.AreEqual(2750, result);
 }