Example #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());
            }
        }
Example #2
0
 public virtual void PresentInstructions()
 {
     _console.WriteLine("Welcome! Enter the number of sticks you want to take (1-3):");
 }