コード例 #1
0
 public void WhenGreatherThan100ReturnException()
 {
     var obj = new MathsComponent();
     try
     {
         string result = obj.FizzBuz(1000);
         Assert.Fail("no exception thrown");
     }
     catch (Exception ex)
     {
         Assert.IsTrue(ex.Message == "Not Allowed beacause it is Greather Than 100");
     }
 }
コード例 #2
0
 public void WhenMultipleThreeReturnFizz()
 {
     var obj = new MathsComponent();
     string result = obj.FizzBuz(3);
     Assert.AreEqual(result, "Fizz");
 }
コード例 #3
0
 public void WHenMultipleFiveAndMultipleThreeThanReturnFizzBuzz()
 {
     var obj = new MathsComponent();
     string result = obj.FizzBuz(15);
     Assert.AreEqual(result, "FizBuzz");
 }
コード例 #4
0
 public void WHenMultipleFiveReturnBuzz()
 {
     var obj = new MathsComponent();
     string result = obj.FizzBuz(5);
     Assert.AreEqual(result, "Buzz");
 }