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)); }
public void Init() { fbp = new FizzBuzzKata.FizzBuzzPattern(FizzBuzzBusinessRules.GetHandlers()); }
public void Cleanup() { fbp = null; }