public void GetCorrectStringForCustomRule() { FizzBuzz fizzBuzz = new FizzBuzz(); fizzBuzz.AddRule(18, "Banana"); var numberAsString = fizzBuzz.GetStringRepresentationFor(18); Assert.AreEqual("FizzBanana", numberAsString); }
public void ChangingRule() { FizzBuzz fizzBuzz = new FizzBuzz(); fizzBuzz.ChangeRule(3, "Buzz"); fizzBuzz.ChangeRule(5, "Fizz"); string numberAsString = fizzBuzz.GetStringRepresentationFor(15); Assert.AreEqual("BuzzFizz", numberAsString); }
public void GetCorrectStringForNumberOne() { string numberAsString = _fizzBuzz.GetStringRepresentationFor(1); Assert.AreEqual("1", numberAsString); }