Beispiel #1
0
        public void TestCascadeElements()
        {
            var cascaded = XmlXsd.Cascade(new schema()
            {
                element =
                {
                    new element(new topLevelElement()
                    {
                        name = "testingElementThatShouldNotBeIn"
                    })
                }
            });

            Assert.IsTrue(XmlXsd.element.Count == 0);
            Assert.IsTrue(cascaded.element.Count == 1);
        }
Beispiel #2
0
        public void TestCascadeAttributes()
        {
            Assert.IsTrue(XmlXsd.attribute.Count == 4);

            var cascaded = XmlXsd.Cascade(new schema()
            {
                attribute =
                {
                    new attribute(new topLevelAttribute()
                    {
                        name = "testingAttr"
                    })
                }
            });

            // remains unchanged
            Assert.IsTrue(XmlXsd.attribute.Count == 4);
            Assert.IsTrue(cascaded.attribute.Count == 5);
        }