コード例 #1
0
        public void shouldPrintStars_NoLoopsLinqsOrIfs()
        {
            string expectedOutput = "*****";

            using (var consoleOutput = new ConsoleOutputUtil())
            {
                starPrinter.PrintStarsOnlyString(5);

                Assert.AreEqual(expectedOutput, consoleOutput.GetOuput());
            }
        }
コード例 #2
0
        public void shouldPrintStars_recursive()
        {
            string expectedOutput = "*****";

            using (var consoleOutput = new ConsoleOutputUtil())
            {
                starPrinter.PrintStarsRecursive(5);

                Assert.AreEqual(expectedOutput, consoleOutput.GetOuput());
            }
        }