Example #1
0
        public void DisplayTexts_GivenTexts_ShouldDisplayTexts()
        {
            var texts = new List <string>
            {
                "1",
                "2",
                "Fizz",
                "4",
                "Buzz",
                "Fizz",
                "7",
                "8",
                "Fizz",
                "Buzz",
                "11",
                "Fizz",
                "13",
                "14",
                "FizzBuzz"
            };

            var expected = "1,2,Fizz,4,Buzz,Fizz,7,8,Fizz,Buzz,11,Fizz,13,14,FizzBuzz";

            var actual = string.Empty;

            void DisplayAction(string s) => actual = s;

            _target.DisplayTexts(texts, DisplayAction);

            expected.Should().BeEquivalentTo(actual);
        }