Exemplo n.º 1
0
        [Test] public void NodeFilter()
        {
            _filters.Add(new MockFilter());
            _nodeCollection.Add("!Item1");
            _nodeCollection.Add("Item2");

            IEnumerator enumerator = _nodeCollection.VisibleItems.GetEnumerator();

            VerifyItems(enumerator, "Item2");

            Assert.AreEqual(1, _nodeCollection.VisibleItemCount);
        }
Exemplo n.º 2
0
        [Test] public void ScrollRangeChangeOnRefilter()
        {
            _nodeCollection.Add("!Item1");
            _nodeCollection.Add("Item2");

            _rowListRenderer.ScrollRangeChanged += new EventHandler(OnScrollRangeChanged);
            _filterCollection.Add(new MockFilter());

            Assert.AreEqual(1, _scrollRangeChanges);
        }
Exemplo n.º 3
0
        [Test] public void ClearSelectionOnFilter()
        {
            JetListViewNode node1 = _nodeCollection.Add("!Item1");
            JetListViewNode node2 = _nodeCollection.Add("!Item2");
            JetListViewNode node3 = _nodeCollection.Add("Item3");

            _model.HandleMouseDown(node1, Keys.None);
            _model.HandleMouseDown(node2, Keys.Shift);

            _filters.Add(new MockFilter());

            Assert.AreEqual(1, _model.Count);
            Assert.IsTrue(_model.Contains("Item3"));
        }