public void Return_String_Representation_Of_Input_Int(int number) { var factory = new UpdateStrategyFactory(); var strategy = factory.Create(number); var conversionService = new NumberConversionService(strategy); var output = conversionService.Convert(); Assert.AreEqual(number.ToString(), output); }
public void Return_FizzBuzz_For_Number_Divisible_By_Three_And_Five(int number) { var factory = new UpdateStrategyFactory(); var strategy = factory.Create(number); var conversionService = new NumberConversionService(strategy); var output = conversionService.Convert(); Assert.AreEqual("FizzBuzz", output); }
static void Main(string[] args) { for (int i = 1; i < 101; i++) { var factory = new UpdateStrategyFactory(); var strategy = factory.Create(i); var conversionService = new NumberConversionService(strategy); var output = conversionService.Convert(); Console.WriteLine(i); } }