예제 #1
0
 public void EvenOddHandlerTest()
 {
     var handlers = new List<IInputHandler>() {
     new EvenHandler(),
     new OddHandler(),
     new DefaultHandler()
       };
       var lfbp = new FizzBuzzPattern(handlers);
       Assert.AreEqual("Odd", lfbp.Process(1));
       Assert.AreEqual("Even", lfbp.Process(2));
       Assert.AreEqual("Odd", lfbp.Process(3));
       Assert.AreEqual("Even", lfbp.Process(4));
       Assert.AreEqual("Odd", lfbp.Process(5));
 }
예제 #2
0
 public void Init()
 {
     fbp = new FizzBuzzKata.FizzBuzzPattern(FizzBuzzBusinessRules.GetHandlers());
 }
예제 #3
0
 public void Cleanup()
 {
     fbp = null;
 }