예제 #1
0
 public void TestValidCategory()
 {
     xmlAnalyser = new XmlAnalyser(string.Format("{0}/{1}/{2}", Directory.GetCurrentDirectory (), "Xml", "Category.xml"));
     Assert.AreEqual ("Category", xmlAnalyser.Entity.Name);
     Assert.AreEqual ("category", xmlAnalyser.Entity.RealName);
     Assert.AreEqual (2, xmlAnalyser.Entity.GetPropertyNames ().Count);
     Assert.AreEqual ("Name", xmlAnalyser.Entity.GetPropertyNames()[0]);
     Assert.AreEqual ("Id", xmlAnalyser.Entity.GetPropertyNames()[1]);
     Assert.AreEqual (2, xmlAnalyser.Entity.GetProperties ().Count);
     XmlString stringObj1 = (XmlString)xmlAnalyser.Entity.GetProperties () [0];
     Assert.AreEqual ("Name", stringObj1.Name);
     Assert.AreEqual ("name", stringObj1.RealName);
     Assert.AreEqual ("Category 1", stringObj1.Value);
     XmlString stringObj2 = (XmlString)xmlAnalyser.Entity.GetProperties () [1];
     Assert.AreEqual ("Id", stringObj2.Name);
     Assert.AreEqual ("id", stringObj2.RealName);
     Assert.AreEqual ("category1", stringObj2.Value);
 }
예제 #2
0
        public void TestValidCategory()
        {
            xmlAnalyser = new XmlAnalyser(string.Format("{0}/{1}/{2}", Directory.GetCurrentDirectory(), "Xml", "Category.xml"));
            Assert.AreEqual("Category", xmlAnalyser.Entity.Name);
            Assert.AreEqual("category", xmlAnalyser.Entity.RealName);
            Assert.AreEqual(2, xmlAnalyser.Entity.GetPropertyNames().Count);
            Assert.AreEqual("Name", xmlAnalyser.Entity.GetPropertyNames()[0]);
            Assert.AreEqual("Id", xmlAnalyser.Entity.GetPropertyNames()[1]);
            Assert.AreEqual(2, xmlAnalyser.Entity.GetProperties().Count);
            XmlString stringObj1 = (XmlString)xmlAnalyser.Entity.GetProperties() [0];

            Assert.AreEqual("Name", stringObj1.Name);
            Assert.AreEqual("name", stringObj1.RealName);
            Assert.AreEqual("Category 1", stringObj1.Value);
            XmlString stringObj2 = (XmlString)xmlAnalyser.Entity.GetProperties() [1];

            Assert.AreEqual("Id", stringObj2.Name);
            Assert.AreEqual("id", stringObj2.RealName);
            Assert.AreEqual("category1", stringObj2.Value);
        }
예제 #3
0
 public void TestInvalidCategoryXml()
 {
     xmlAnalyser = new XmlAnalyser(string.Format("{0}/{1}/{2}", Directory.GetCurrentDirectory(), "Xml", "CategoryBroken.xml"));
     Assert.IsNull(xmlAnalyser.Entity);
 }
예제 #4
0
 public void TearDown()
 {
     xmlAnalyser = null;
 }
예제 #5
0
 public void TestInvalidCategoryXml()
 {
     xmlAnalyser = new XmlAnalyser(string.Format("{0}/{1}/{2}", Directory.GetCurrentDirectory (), "Xml", "CategoryBroken.xml"));
     Assert.IsNull (xmlAnalyser.Entity);
 }
예제 #6
0
 public void TearDown()
 {
     xmlAnalyser = null;
 }
예제 #7
0
파일: Program.cs 프로젝트: jay81979/XmlEdit
 public static void Main(string[] args)
 {
     XmlAnalyser xmlAnalyser = new XmlAnalyser(string.Format("{0}/{1}/{2}", Directory.GetCurrentDirectory(), "Xml", "CategoryBroken.xml"));
 }
예제 #8
0
파일: Program.cs 프로젝트: jay81979/XmlEdit
 public static void Main(string[] args)
 {
     XmlAnalyser xmlAnalyser = new XmlAnalyser(string.Format("{0}/{1}/{2}", Directory.GetCurrentDirectory (), "Xml", "CategoryBroken.xml"));
 }