Esempio n. 1
0
        public void ClearItemsTest()
        {
            var xmlDoc = new XmlDocument(ExcelSlicer.SlicerDocumentNamespaceManager.NameTable);

            xmlDoc.LoadXml("<items count=\"1\" xmlns=\"http://schemas.microsoft.com/office/spreadsheetml/2009/9/main\"><i x=\"2\" s=\"1\"/></items>");
            var node = xmlDoc.FirstChild;
            var slicerCacheNamespaceManager = ExcelSlicer.SlicerDocumentNamespaceManager;
            var tabularItems = new SlicerCacheTabularItems(node, slicerCacheNamespaceManager);

            tabularItems.Add(1, false);
            tabularItems.Clear();
        }
Esempio n. 2
0
        public void AddItemIsSelectedFalse()
        {
            var xmlDoc = new XmlDocument(ExcelSlicer.SlicerDocumentNamespaceManager.NameTable);

            xmlDoc.LoadXml("<items count=\"1\" xmlns=\"http://schemas.microsoft.com/office/spreadsheetml/2009/9/main\"><i x=\"2\" s=\"1\"/></items>");
            var node = xmlDoc.FirstChild;
            var slicerCacheNamespaceManager = ExcelSlicer.SlicerDocumentNamespaceManager;
            var tabularItems = new SlicerCacheTabularItems(node, slicerCacheNamespaceManager);

            tabularItems.Add(1, false);
            Assert.AreEqual(2, tabularItems.Count);
            Assert.AreEqual(2, tabularItems[0].AtomIndex);
            Assert.IsTrue(tabularItems[0].IsSelected);
            Assert.AreEqual(1, tabularItems[1].AtomIndex);
            Assert.IsFalse(tabularItems[1].IsSelected);
        }