Ejemplo n.º 1
0
        public void op_Check_whenNameWrong()
        {
            var obj = new XmlElementTest(typeof(XmlDecorationClass1).GetProperty("Element"))
                          {
                              ElementName = "xxx"
                          };

            Assert.Throws<UnitTestException>(() => obj.Check());
        }
Ejemplo n.º 2
0
        public void op_Check_whenNameWrong()
        {
            var obj = new XmlElementTest(typeof(XmlDecorationClass1).GetProperty("Element"))
            {
                ElementName = "xxx"
            };

            Assert.Throws <UnitTestException>(() => obj.Check());
        }
Ejemplo n.º 3
0
        public void op_Check_whenTrue()
        {
            var obj = new XmlElementTest(typeof(XmlDecorationClass1).GetProperty("NamespaceElement"))
                          {
                              ElementName = "element",
                              Namespace = "urn:example.org"
                          };

            Assert.True(obj.Check());
        }
Ejemplo n.º 4
0
        public void op_Check_whenTrue()
        {
            var obj = new XmlElementTest(typeof(XmlDecorationClass1).GetProperty("NamespaceElement"))
            {
                ElementName = "element",
                Namespace   = "urn:example.org"
            };

            Assert.True(obj.Check());
        }
Ejemplo n.º 5
0
        public void prop_Namespace()
        {
            const string expected = "example";

            var obj = new XmlElementTest(typeof(XmlDecorationClass1).GetProperty("Element"))
                          {
                              Namespace = expected
                          };

            var actual = obj.Namespace;

            Assert.Same(expected, actual);
        }
Ejemplo n.º 6
0
        public void prop_Namespace()
        {
            const string expected = "example";

            var obj = new XmlElementTest(typeof(XmlDecorationClass1).GetProperty("Element"))
            {
                Namespace = expected
            };

            var actual = obj.Namespace;

            Assert.Same(expected, actual);
        }
Ejemplo n.º 7
0
        public void op_Check_whenXmlAttributeMissing()
        {
            var obj = new XmlElementTest(typeof(PropertiedClass1).GetProperty("AutoBoolean"));

            Assert.Throws<UnitTestException>(() => obj.Check());
        }
Ejemplo n.º 8
0
        public void op_Check_whenXmlAttributeMissing()
        {
            var obj = new XmlElementTest(typeof(PropertiedClass1).GetProperty("AutoBoolean"));

            Assert.Throws <UnitTestException>(() => obj.Check());
        }