public void stOutParseTest2()
 {
     OWPComponent target = new OWPComponent((IEnvironment)null);
     target.parse("[OWP out.NotSupportedTest]");
 }
 public void stItemWriteParseTest2()
 {
     OWPComponent target = new OWPComponent(Env);
     Assert.AreEqual(String.Empty, target.parse("[OWP item(\"name\").write(false): data]"));
     Assert.AreEqual(String.Empty, target.parse("[OWP item(\"name\").write(true): data]"));
     Assert.AreEqual(String.Empty, target.parse("[OWP item(\"name\").writeLine(false): data]"));
     Assert.AreEqual(String.Empty, target.parse("[OWP item(\"name\").writeLine(true): data]"));
 }
 public void stOutParseTest1()
 {
     OWPComponent target = new OWPComponent((IEnvironment)null);
     Assert.AreEqual(String.Empty, target.parse("[OWP out.All]"));
     Assert.AreEqual(String.Empty, target.parse("[OWP out]"));
     Assert.AreEqual(String.Empty, target.parse("[OWP out.Warnings.Raw]"));
     Assert.AreEqual(String.Empty, target.parse("[OWP out.Warnings]"));
     Assert.AreEqual("0", target.parse("[OWP out.Warnings.Count]"));
     Assert.AreEqual(String.Empty, target.parse("[OWP out.Warnings.Codes]"));
     Assert.AreEqual(String.Empty, target.parse("[OWP out.Errors.Raw]"));
     Assert.AreEqual(String.Empty, target.parse("[OWP out.Errors]"));
     Assert.AreEqual("0", target.parse("[OWP out.Errors.Count]"));
     Assert.AreEqual(String.Empty, target.parse("[OWP out.Errors.Codes]"));
 }
 public void stItemParseTest4()
 {
     OWPComponent target = new OWPComponent((IEnvironment)null);
     target.parse("[OWP item(name).write(false): ]");
 }
 public void stItemWriteParseTest1()
 {
     OWPComponent target = new OWPComponent((IEnvironment)null);
     target.parse("[OWP item(\"name\").write(\"false\"): ]");
 }
        public void stOutParseTest5()
        {
            try {
                OWPComponent target = new OWPComponent((IEnvironment)null);
                target.parse("[OWP out(\"NotAvailableName\").Warnings.Raw]");
                Assert.Fail("1");
            }
            catch(NotFoundException) {
                Assert.IsTrue(true);
            }

            try {
                OWPComponent target = new OWPComponent((IEnvironment)null);
                target.parse("[OWP out(\"814F1F57-BF57-4944-8100-CA5514BB4194\", true).All]");
                Assert.Fail("2");
            }
            catch(NotFoundException) {
                Assert.IsTrue(true);
            }
        }
Esempio n. 7
0
 public void stItemWriteParseTest3()
 {
     OWPComponent target = new OWPComponent(Env);
     Assert.AreEqual(Value.Empty, target.parse("[OWP item(\"name\").write(false): multi\nline\" \n 'data'.]"));
     Assert.AreEqual(Value.Empty, target.parse("[OWP item(\"name\").write(true): multi\nline\" \n 'data'.]"));
     Assert.AreEqual(Value.Empty, target.parse("[OWP item(\"name\").writeLine(false): multi\nline\" \n 'data'.]"));
     Assert.AreEqual(Value.Empty, target.parse("[OWP item(\"name\").writeLine(true): multi\nline\" \n 'data'.]"));
 }
 public void stItemDeleteParseTest1()
 {
     OWPComponent target = new OWPComponent(Env);
     Assert.AreEqual(String.Empty, target.parse("[OWP item(\"name\").delete]"));
 }
 public void stItemDeleteParseTest2()
 {
     OWPComponent target = new OWPComponent(Env);
     Assert.AreEqual(Value.from(false), target.parse("[OWP item(\"name\").delete = false]"));
     Assert.AreEqual(Value.from(true), target.parse("[OWP item(\"name\").delete = true]"));
 }
Esempio n. 10
0
        public void stOutParseTest5()
        {
            var target = new OWPComponent((IEnvironment)null);

            try {
                target.parse("[OWP out(\"NotAvailableName\").Warnings.Raw]");
                Assert.Fail("1");
            }
            catch(Exception ex) { Assert.IsTrue(ex.GetType() == typeof(NotFoundException), ex.GetType().ToString()); }

            try {
                target.parse("[OWP out(\"814F1F57-BF57-4944-8100-CA5514BB4194\", true).All]");
                Assert.Fail("2");
            }
            catch(Exception ex) { Assert.IsTrue(ex.GetType() == typeof(NotFoundException), ex.GetType().ToString()); }
        }
 public void parseTest3()
 {
     OWPComponent target = new OWPComponent((IEnvironment)null);
     target.parse("[OWP NotFound.Test]");
 }
Esempio n. 12
0
        public void stOutParseTest4()
        {
            var target = new OWPComponent((IEnvironment)null);

            try {
                target.parse("[OWP out.All.NotRealProperty]");
                Assert.Fail("1");
            }
            catch(Exception ex) { Assert.IsTrue(ex.GetType() == typeof(NotSupportedOperationException), ex.GetType().ToString()); }

            try {
                target.parse("[OWP out.Warnings.NotRealProperty]");
                Assert.Fail("2");
            }
            catch(Exception ex) { Assert.IsTrue(ex.GetType() == typeof(NotSupportedOperationException), ex.GetType().ToString()); }

            try {
                target.parse("[OWP out.Warnings.Codes.NotRealProperty]");
                Assert.Fail("3");
            }
            catch(Exception ex) { Assert.IsTrue(ex.GetType() == typeof(NotSupportedOperationException), ex.GetType().ToString()); }

            try {
                target.parse("[OWP out.NotRealProperty]");
                Assert.Fail("4");
            }
            catch(Exception ex) { Assert.IsTrue(ex.GetType() == typeof(IncorrectNodeException), ex.GetType().ToString()); }

            try {
                target.parse("[OWP out.Warnings.Count = 12]");
                Assert.Fail("5");
            }
            catch(Exception ex) { Assert.IsTrue(ex.GetType() == typeof(NotSupportedOperationException), ex.GetType().ToString()); }
        }
Esempio n. 13
0
        public void stOutParseTest3()
        {
            var target = new OWPComponent((IEnvironment)null);

            try {
                target.parse("[OWP out()]");
                Assert.Fail("1");
            }
            catch(Exception ex) { Assert.IsTrue(ex.GetType() == typeof(InvalidArgumentException), ex.GetType().ToString()); }

            try {
                target.parse("[OWP out().All]");
                Assert.Fail("2");
            }
            catch(Exception ex) { Assert.IsTrue(ex.GetType() == typeof(InvalidArgumentException), ex.GetType().ToString()); }
        }
Esempio n. 14
0
 public void stOutParseTest2()
 {
     OWPComponent target = new OWPComponent((IEnvironment)null);
     target.parse("[OWP out.NotRealPropertyTest]");
 }
        public void stOutParseTest3()
        {
            try {
                OWPComponent target = new OWPComponent((IEnvironment)null);
                target.parse("[OWP out()]");
                Assert.Fail("1");
            }
            catch(InvalidArgumentException) {
                Assert.IsTrue(true);
            }

            try {
                OWPComponent target = new OWPComponent((IEnvironment)null);
                target.parse("[OWP out().All]");
                Assert.Fail("2");
            }
            catch(InvalidArgumentException) {
                Assert.IsTrue(true);
            }
        }
 public void stItemParseTest1()
 {
     OWPComponent target = new OWPComponent((IEnvironment)null);
     target.parse("[OWP item(\"name\")]");
 }
        public void stOutParseTest4()
        {
            try {
                OWPComponent target = new OWPComponent((IEnvironment)null);
                target.parse("[OWP out.All.NotRealProperty]");
                Assert.Fail("1");
            }
            catch(NotSupportedOperationException) {
                Assert.IsTrue(true);
            }

            try {
                OWPComponent target = new OWPComponent((IEnvironment)null);
                target.parse("[OWP out.Warnings.NotRealProperty]");
                Assert.Fail("2");
            }
            catch(NotSupportedOperationException) {
                Assert.IsTrue(true);
            }

            try {
                OWPComponent target = new OWPComponent((IEnvironment)null);
                target.parse("[OWP out.Warnings.Codes.NotRealProperty]");
                Assert.Fail("3");
            }
            catch(NotSupportedOperationException) {
                Assert.IsTrue(true);
            }

            try {
                OWPComponent target = new OWPComponent((IEnvironment)null);
                target.parse("[OWP out.NotRealProperty]");
                Assert.Fail("4");
            }
            catch(OperationNotFoundException) {
                Assert.IsTrue(true);
            }

            try {
                OWPComponent target = new OWPComponent((IEnvironment)null);
                target.parse("[OWP out.Warnings.Count = 12]");
                Assert.Fail("5");
            }
            catch(NotSupportedOperationException) {
                Assert.IsTrue(true);
            }
        }
 public void stItemParseTest2()
 {
     OWPComponent target = new OWPComponent((IEnvironment)null);
     target.parse("[OWP item(\"name\").NotSupportedTest]");
 }
 public void parseTest2()
 {
     OWPComponent target = new OWPComponent((IEnvironment)null);
     target.parse("OWP out.Warnings.Count");
 }
Esempio n. 20
0
 public void stItemClearParseTest1()
 {
     OWPComponent target = new OWPComponent(Env);
     Assert.AreEqual(Value.Empty, target.parse("[OWP item(\"name\").clear]"));
 }