public void ReadFirstUnreadLine_OneLineUnreadReadTwoLines_ReturnsNull() { CreateConsole(); FakeConsoleTextEditor.RaisePreviewKeyDownEvent(Key.A); FakeConsoleTextEditor.RaisePreviewKeyDownEventForDialogKey(Key.Enter); TestableScriptingConsole.ReadFirstUnreadLine(); string line = TestableScriptingConsole.ReadFirstUnreadLine(); Assert.IsNull(line); }
public void ReadFirstUnreadLine_OneLineUnread_ReturnsLine() { CreateConsole(); FakeConsoleTextEditor.RaisePreviewKeyDownEvent(Key.A); FakeConsoleTextEditor.RaisePreviewKeyDownEventForDialogKey(Key.Enter); string line = TestableScriptingConsole.ReadFirstUnreadLine(); string expectedline = "A"; Assert.AreEqual(expectedline, line); }