Esempio n. 1
0
        public void XElementCreatorTest_EmptyString()
        {
            var      creator = new XElementCreator();
            XElement node    = creator.Create(string.Empty);

            Assert.IsNull(node);
        }
Esempio n. 2
0
        public void XElementCreatorTest_Valid()
        {
            string   xml     = @"<and>
		                        <equals><int>1</int><int>1</int></equals>
		                        <more><int>2</int><int>1</int></more>
	                        </and>"    ;
            var      creator = new XElementCreator();
            XElement node    = creator.Create(xml);

            Assert.AreEqual("and", node.Name.LocalName);
            Assert.AreEqual(2, node.Elements().Count());
        }