public void ReadLineReturnsNullWhenConsoleDisposed() { RubyConsole console = new RubyConsole(new MockTextEditor(), null); console.Dispose(); Assert.IsNull(console.ReadLine(0)); }
public void HostDisposesRubyConsole() { DerivedRubyConsoleHost host = new DerivedRubyConsoleHost(new MockTextEditor()); RubyConsole console = host.CallCreateConsole(null, null, null) as RubyConsole; host.Dispose(); Assert.IsNull(console.ReadLine(0)); }
public void NoTextWrittenWhenAutoIndentSizeIsZero() { MockTextEditor textEditor = new MockTextEditor(); RubyConsole console = new RubyConsole(textEditor, null); textEditor.RaiseKeyPressEvent('a'); textEditor.RaiseDialogKeyPressEvent(Keys.Enter); textEditor.IsWriteCalled = false; console.ReadLine(0); Assert.IsFalse(textEditor.IsWriteCalled); }
void ReadLineFromConsoleOnDifferentThread() { System.Console.WriteLine("Reading on different thread"); readLine = RubyConsole.ReadLine(autoIndentSize); System.Console.WriteLine("Finished reading on different thread"); }
void ReadLinesOnSeparateThread() { line1 = RubyConsole.ReadLine(0); line2 = RubyConsole.ReadLine(0); }