[Test] public void RequestScrollOnFocusChange() { _rowListRenderer.RequestVerticalScroll += new RequestScrollEventHandler(_rowListRenderer_OnRequestScroll); JetListViewNode item1 = _nodeCollection.Add("Item1", null); JetListViewNode item2 = _nodeCollection.Add("Item2", null); _rowListRenderer.VisibleHeight = 10; _selectionModel.HandleKeyDown(Keys.Down); Assert.AreEqual(-1, _lastRequestScroll); _selectionModel.HandleKeyDown(Keys.Down); Assert.AreEqual(17, _lastRequestScroll); }
[Test] public void ProcessDownKey() { JetListViewNode item = _nodeCollection.Add("Item1"); JetListViewNode item2 = _nodeCollection.Add("Item2"); _model.HandleMouseDown(item, Keys.None); _model.HandleKeyDown(Keys.Down); Assert.IsFalse(_model.IsNodeSelected(item)); Assert.IsTrue(_model.IsNodeSelected(item2)); Assert.IsTrue(_model.IsNodeFocused(item2)); }