public void AppendsSingleCharacterToString() { var terminal = new ClientTerminal(); terminal.AppendToCurrentLine('h'); Assert.AreEqual("h", terminal.GetCurrentLine()); }
public void AppendsTextToCurrentLine() { var terminal = new ClientTerminal(); terminal.AppendToCurrentLine("hello"); Assert.AreEqual("hello", terminal.GetCurrentLine()); }
public void BackspaceRemovesNothingOnEmptyCurrentLine() { var terminal = new ClientTerminal(); terminal.Backspace(); Assert.AreEqual("", terminal.GetCurrentLine()); }
public void BackspaceRemovesOneCharacterFromCurrentLine() { var terminal = new ClientTerminal(); terminal.AppendToCurrentLine("world"); terminal.Backspace(); Assert.AreEqual("worl", terminal.GetCurrentLine()); }
public void CurrentLineIsEmptyAfterWritingIntoBuffer() { var terminal = new ClientTerminal(); terminal.AppendToCurrentLine("hello"); terminal.WriteCurrentLine(TerminalStyle.Default); Assert.AreEqual("", terminal.GetCurrentLine()); }
public void StartsWithEmptyCurrentLine() { var terminal = new ClientTerminal(); Assert.AreEqual("", terminal.GetCurrentLine()); }