public void can_solve_classic_fizzbuzz_backwards() { var fizzer = new FizzBuzzOmatic(); fizzer.Add(3, "Fizz"); fizzer.Add(5, "Buzz"); var result = fizzer.ProduceRange(100, 1); var expected = FizzBuzzCsvFile.Read <FizzBuzzCsvFile.FizzBuzzDataRecord>(Path.Combine("Data", "FizzBuzzData.csv")).Reverse(); Assert.Equal(expected, result); }
public void can_solve_classic_fizzbuzz() { var fizzer = new FizzBuzzOmatic(); fizzer.Add(3, "Fizz"); fizzer.Add(5, "Buzz"); var result = fizzer.ProduceRange(1, 100); var expected = FizzBuzzCsvFile.Read <FizzBuzzCsvFile.FizzBuzzDataRecord>(Path.Combine("Data", "FizzBuzzData.csv")); Assert.Equal(expected.ToArray(), result.ToArray()); }
public void can_solve_super_fizzbuzz() { var fizzer = new FizzBuzzOmatic(); fizzer.Add(3, "Fizz"); fizzer.Add(7, "Buzz"); fizzer.Add(38, "Bazz"); var result = fizzer.ProduceRange(-12, 145); var expected = FizzBuzzCsvFile.Read <FizzBuzzCsvFile.SuperFizzBizzDataRecord>(Path.Combine("Data", "SuperFizzBuzzData.csv")); Assert.Equal(expected.ToArray(), result.ToArray()); }