Example #1
0
        public void RowColumnItemWithGivenTypeAttribute()
        {
            var xmlDoc = new XmlDocument(TestUtility.CreateDefaultNSM().NameTable);

            xmlDoc.LoadXml(@"<rowItems><i xmlns=""http://schemas.openxmlformats.org/spreadsheetml/2006/main""><x v=""1""/><x v=""1048832""/><x/></i></rowItems>");
            var parentNode = xmlDoc.SelectSingleNode("//rowItems");
            var item       = new RowColumnItem(TestUtility.CreateDefaultNSM(), parentNode, 0, 0, "grand");

            Assert.IsNotNull(item);
            Assert.AreEqual("grand", item.ItemType);
            Assert.AreEqual(0, item.RepeatedItemsCount);
        }
Example #2
0
        public void RowColumnItem()
        {
            var xmlDoc = new XmlDocument(TestUtility.CreateDefaultNSM().NameTable);

            xmlDoc.LoadXml(
                $@"<i xmlns=""http://schemas.openxmlformats.org/spreadsheetml/2006/main"" r=""1"" i=""1"" t=""grand"">
					<x v=""1""/>
					<x v=""1048832""/>
					<x/>
				</i>"                );
            var node = xmlDoc.FirstChild;
            var item = new RowColumnItem(TestUtility.CreateDefaultNSM(), node);

            Assert.AreEqual(3, item.Count);
            Assert.AreEqual(1, item.RepeatedItemsCount);
            Assert.AreEqual(1, item.DataFieldIndex);
            Assert.AreEqual("grand", item.ItemType);
        }