public void FakeScreenWritesWhereItsSupposedTo() { var fakeScreen = new FakeScreen(); fakeScreen.Write(10, 10, "Hello", ConsoleColor.Blue); Assert.Equal(fakeScreen[14, 10].Char, 'o'); Assert.Equal(fakeScreen[14, 10].Color, ConsoleColor.Blue); fakeScreen.Clear(); Assert.Equal(fakeScreen[14, 10].Char, ' '); Assert.Equal(fakeScreen[14, 10].Color, ConsoleColor.White); }
public void CharacterWritesCorrectly() { var screen = new FakeScreen(); screen.Clear(); screen.Write(10, 10, "* * * * * * * * * * * * * * *"); screen.Write(10, 11, " * * * * * * * * * * * * * * * "); screen.Write(10, 12, "* * * * * * * * * * * * * * * * * * * * * * * * *"); screen.Write(10, 13, " * * * * * * * * * * * * * * * "); screen.Write(10, 14, "* * * * * * * * * * * * * * *"); //Console.ReadKey(true); Console.WriteLine(screen[10, 10].Char); Assert.Equal(2, 2); }