Exemplo n.º 1
0
        public void ClassicRules(int upperBound, string expected)
        {
            FizzBuzz buzz = new FizzBuzz();

            string actual = string.Join(string.Empty, buzz.Range(upperBound));
            Assert.AreEqual(expected, actual);
        }
Exemplo n.º 2
0
        public void CustomRules_EmptySet(int upperBound, string expected)
        {
            FizzBuzz buzz = new FizzBuzz(new Dictionary<int, string>());

            string actual = string.Join(string.Empty, buzz.Range(upperBound));

            Assert.AreEqual(expected, actual);
        }
Exemplo n.º 3
0
        public void CustomRules_LowerCase(int upperBound, string expected)
        {
            FizzBuzz buzz = new FizzBuzz(new Dictionary<int, string>
            {
                {5, "buzz"},
                {3, "fizz"},
            });

            string actual = string.Join(string.Empty, buzz.Range(upperBound));
            Assert.AreEqual(expected, actual);
        }