public static void Init(TestContext testContext)
 {
     _sut = new FizzBuzz();
     _sut.AddRule(new Rule(3, "fizz"));
     _sut.AddRule(new Rule(5, "buzz"));
     _sut.AddRule(new Rule(7, "pop"));
     _sut.AddRule(new Rule(2, "pep"));
 }
示例#2
0
        public void SetNewRule()
        {
            _fizzBuzz.AddRule(2, "Banana");

            var numberAsString = _fizzBuzz.Process(4);

            Assert.AreEqual("Banana", numberAsString);
        }