예제 #1
0
        public void NodeCollectionClearAllTest()
        {
            IEvent event1 = new MockEvent("item1", DateTime.Now, null, "Access");
            IEvent event2 = new MockEvent("item2", DateTime.Now, null, "Creation");
            Node   node1  = new MockNode(event1);
            Node   node2  = new MockNode(event2);

            var nodeCollection = new NodeCollection {
                nodeList = new List <Node> {
                    node1, node2
                }
            };

            Assert.AreEqual(2, CountVisible(nodeCollection.nodeList));
            nodeCollection.AddEventFilter("mockFilter", new MockNodeFilter(node1));
            Assert.AreEqual(1, CountVisible(nodeCollection.nodeList));
            nodeCollection.ClearAllFilters();
            Assert.AreEqual(2, CountVisible(nodeCollection.nodeList));
        }