public void BasicCursorMovement(char modifier, ConsoleBuffer.Commands.CursorMove.CursorDirection expectedDirection) { var parser = this.EnsureCommandParses($"\x1b{modifier}"); var cmd = parser.Command as ConsoleBuffer.Commands.CursorMove; Assert.IsNotNull(cmd); Assert.AreEqual(expectedDirection, cmd.Direction); Assert.AreEqual(1, cmd.Count); }
public void CursorMove(string code, int count, ConsoleBuffer.Commands.CursorMove.CursorDirection direction) { var command = $"\x1b[{code}"; var parser = this.EnsureCommandParses(command); var cmd = parser.Command as ConsoleBuffer.Commands.CursorMove; Assert.IsNotNull(cmd); Assert.AreEqual(direction, cmd.Direction); Assert.AreEqual(count, cmd.Count); }