public void TestDown() { h.SelectPrevious(); h.SelectPrevious(); h.SelectPrevious(); h.SelectPrevious(); Assert.AreEqual(h.SelectNext(), "222"); Assert.AreEqual(h.SelectNext(), "333"); Assert.AreEqual(h.SelectNext(), null); }
private bool IsControlKeys(KeyEventArgs e) { switch (e.Key) { case Key.Up: SetInput(historyCommand.SelectPreviuos()); break; case Key.Down: SetInput(historyCommand.SelectNext()); break; case Key.Home: FocusEnd(); break; case Key.Return: RunCmd(); break; default: return(false); } return(true); }