public void ShouldProduceExpectedOutputForGivenInput(int input, string expected) { var outputBuilder = new OutputBuilder(); var rulesChain = FizzBuzzWorkflowFactory.Create(outputBuilder); var workflow = new RuleWorkflow(rulesChain); workflow.Run(input); outputBuilder.Build().Should().Be(expected); }
public static void Main(string[] args) { var outputBuilder = new OutputBuilder(); var worflow = new RuleWorkflow(FizzBuzzWorkflowFactory.Create(outputBuilder)); var input = int.Parse(Console.ReadLine()); worflow.Run(input); Console.WriteLine(outputBuilder.Build()); Console.ReadKey(); }