Beispiel #1
0
        public void ConsoleWrapperShouldWriteOutput()
        {
            using (StringWriter sw = new StringWriter())
            {
                Console.SetOut(sw);

                sut.WriteLine("Hello");

                string expected = string.Format("Hello\n");
                Assert.Equal(expected, sw.ToString());
            }
        }
Beispiel #2
0
 public virtual void PresentInstructions()
 {
     _console.WriteLine("Welcome! Enter the number of sticks you want to take (1-3):");
 }