public void FizzBuzzTestSimplePasses() { // Use the Assert class to test conditions int[] input = { 4, 3, 6, 30, 10, 12 }; int[] output = FizzBuzzFilter.fizzBuzzFunc(input); int[] expected = { 4, 3, 3, 0, 5, 3 }; CollectionAssert.AreEqual(expected, output); }
public void FizzBuzztestSimple() { int[] input = { 4, 3, 6, 30, 10, 12 }; int[] output = FizzBuzzFilter.multiFizzBuzz(input); int[] expected = { 4, 3, 3, 0, 5, 3 }; // Use the Assert class to test conditions CollectionAssert.AreEqual(expected, output); }
public void ShouldReturnCorrectValue(int number, string expectValue) { Filter fizzbuzz = new FizzBuzzFilter(); Filter buzz = new BuzzFilter(); Filter fizz = new FizzFilter(); Filter nop = new NoFilter(); fizzbuzz.SetNextFilter(buzz); buzz.SetNextFilter(fizz); fizz.SetNextFilter(nop); var actualValue = fizzbuzz.GetValue(number); Assert.Equal(expectValue, actualValue); }
public static int[] combinedFilter(int[] xs) { return(FizzBuzzFilter.multiFizzBuzz(Modulo3.moduloThree(xs))); }
public static int[] combinedFilter(int[] xs) { return(FizzBuzzFilter.multiFizzBuzz(DecrementIfLessThanFirstFilter.DecrementIfLess(DiffFilter.Diff(xs.ToList <int>()).ToArray()))); }