public void FizzBuzz_Returns_Number_When_Value_Is_Not_Divisible_By_3() { var fizzBuzz = new FizzBuzz(); fizzBuzz.AddPair(3, "Fizz"); fizzBuzz.AddPair(5, "Buzz"); Assert.AreEqual("1", fizzBuzz.Execute(1, 1).First()); Assert.AreEqual("13", fizzBuzz.Execute(13, 13).First()); }
public void Exception_Thrown_When_Upper_Is_Less_Than_Lower() { var fizzBuzz = new FizzBuzz(); fizzBuzz.AddPair(3, "Fizz"); Assert.AreEqual("Buzz", fizzBuzz.Execute(5, 4).First()); }
public void FizzBuzz_Returns_Fizz_When_Value_Is_Divisible_By_3() { var fizzBuzz = new FizzBuzz(); fizzBuzz.AddPair(3, "Fizz"); Assert.AreEqual("Fizz", fizzBuzz.Execute(3, 3).First()); }
public void Can_Add_NumberWord_Pair_To_FizzBuzz() { var fizzBuzz = new FizzBuzz(); fizzBuzz.AddPair(3, "Fizz"); Assert.AreEqual(1, fizzBuzz.Pairs.Count); }