public void eventsItemRunTest1()
        {
            var target = new InternalComponentAccessor();

            try {
                target.parse("[Core events.Pre.item(1).run]");
                Assert.Fail("1");
            }
            catch (Exception ex) { Assert.IsTrue(ex.GetType() == typeof(IncorrectNodeException), ex.GetType().ToString()); }

            try {
                target.parse("[Core events.Pre.item(1).run() = true]");
                Assert.Fail("2");
            }
            catch (Exception ex) { Assert.IsTrue(ex.GetType() == typeof(NotSupportedOperationException), ex.GetType().ToString()); }

            try {
                target.parse("[Core events.Pre.item(1).run(): true]");
                Assert.Fail("3");
            }
            catch (Exception ex) { Assert.IsTrue(ex.GetType() == typeof(NotSupportedOperationException), ex.GetType().ToString()); }

            try {
                target.parse("[Core events.Pre.item(1).run().m]");
                Assert.Fail("4");
            }
            catch (Exception ex) { Assert.IsTrue(ex.GetType() == typeof(NotSupportedOperationException), ex.GetType().ToString()); }
        }
Пример #2
0
 public void pEnabledParseTest1()
 {
     InternalComponentAccessor target = new InternalComponentAccessor();
     Assert.AreEqual(Value.from(true), target.parse("[vsCE events.Pre.item(1).Enabled]"));
     Assert.AreEqual(Value.from(true), target.parse("[vsCE events.Pre.item(\"Name1\").Enabled]"));
     Assert.AreEqual(Value.from(false), target.parse("[vsCE events.Pre.item(2).Enabled]"));
     Assert.AreEqual(Value.from(false), target.parse("[vsCE events.Pre.item(\"Name2\").Enabled]"));
 }
        public void pEnabledParseTest1()
        {
            InternalComponentAccessor target = new InternalComponentAccessor();

            Assert.AreEqual(Value.from(true), target.parse("[vsSBE events.Pre.item(1).Enabled]"));
            Assert.AreEqual(Value.from(true), target.parse("[vsSBE events.Pre.item(\"Name1\").Enabled]"));
            Assert.AreEqual(Value.from(false), target.parse("[vsSBE events.Pre.item(2).Enabled]"));
            Assert.AreEqual(Value.from(false), target.parse("[vsSBE events.Pre.item(\"Name2\").Enabled]"));
        }
        public void eventsItemRunTest2()
        {
            var target = new InternalComponentAccessor();

            Assert.AreEqual(Value.from(true), target.parse("[Core events.Pre.item(1).run()]"));
            Assert.AreEqual(Value.from(true), target.parse("[Core events.Pre.item(1).run(Common)]"));
            Assert.AreEqual(Value.from(false), target.parse("[Core events.Pre.item(2).run()]"));
            Assert.AreEqual(Value.from(false), target.parse("[Core events.Pre.item(3).run()]"));
            Assert.AreEqual(Value.from(false), target.parse("[Core events.Pre.item(3).run(Common)]"));
            Assert.AreEqual(Value.from(true), target.parse("[Core events.Pre.item(3).run(Rebuild)]"));
        }
        public void pEnabledParseTest3()
        {
            InternalComponentAccessor target = new InternalComponentAccessor();

            Assert.AreEqual(Value.From(true), target.Eval("[vsSBE events.Pre.item(1).Enabled]"));
            Assert.AreEqual(Value.Empty, target.Eval("[vsSBE events.Pre.item(1).Enabled = false]"));
            Assert.AreEqual(Value.From(false), target.Eval("[vsSBE events.Pre.item(1).Enabled]"));

            Assert.AreEqual(Value.From(false), target.Eval("[vsSBE events.Pre.item(\"Name2\").Enabled]"));
            Assert.AreEqual(Value.Empty, target.Eval("[vsSBE events.Pre.item(\"Name2\").Enabled = true]"));
            Assert.AreEqual(Value.From(true), target.Eval("[vsSBE events.Pre.item(\"Name2\").Enabled]"));
        }
        public void pStderrTest2()
        {
            var target = new InternalComponentAccessor();

            Assert.AreNotEqual(null, target.parse("[Core events.Pre.item(1).stderr]"));
        }
        public void pStatusParseTest3()
        {
            InternalComponentAccessor target = new InternalComponentAccessor();

            target.parse("[vsSBE events.Pre.item(1).Status.NotExistProp]");
        }
        public void pStderrTest1()
        {
            var target = new InternalComponentAccessor();

            target.parse("[Core events.Pre.item(1).stderr = true]");
        }
        public void pStatusParseTest1()
        {
            InternalComponentAccessor target = new InternalComponentAccessor();

            target.parse("[vsSBE events.Pre.item(1).Status.Has Errors]");
        }
        public void pStatusParseTest2()
        {
            InternalComponentAccessor target = new InternalComponentAccessor();

            Assert.AreEqual("false", target.parse("[vsSBE events.Pre.item(1).Status.HasErrors]"));
        }
Пример #11
0
 public void pStatusParseTest3()
 {
     InternalComponentAccessor target = new InternalComponentAccessor();
     target.parse("[vsCE events.Pre.item(1).Status.NotExistProp]");
 }
        public void pEnabledParseTest2()
        {
            InternalComponentAccessor target = new InternalComponentAccessor();

            target.parse("[vsSBE events.Pre.item(1).Enabled = 1true]");
        }
Пример #13
0
 public void pStatusParseTest2()
 {
     InternalComponentAccessor target = new InternalComponentAccessor();
     Assert.AreEqual("false", target.parse("[vsCE events.Pre.item(1).Status.HasErrors]"));
 }
Пример #14
0
 public void pStdoutTest1()
 {
     var target = new InternalComponentAccessor();
     target.parse("[Core events.Pre.item(1).stdout = true]");
 }
Пример #15
0
 public void pStatusParseTest1()
 {
     InternalComponentAccessor target = new InternalComponentAccessor();
     target.parse("[vsCE events.Pre.item(1).Status.Has Errors]");
 }
Пример #16
0
 public void pEnabledParseTest2()
 {
     InternalComponentAccessor target = new InternalComponentAccessor();
     target.parse("[vsCE events.Pre.item(1).Enabled = 1true]");
 }
Пример #17
0
 public void pStdoutTest2()
 {
     var target = new InternalComponentAccessor();
     Assert.AreNotEqual(null, target.parse("[Core events.Pre.item(1).stdout]"));
 }
        public void pStdoutTest1()
        {
            var target = new InternalComponentAccessor();

            target.Eval("[Core events.Pre.item(1).stdout = true]");
        }
        public void pEnabledParseTest3()
        {
            InternalComponentAccessor target = new InternalComponentAccessor();
            Assert.AreEqual("true", target.parse("[vsCE events.Pre.item(1).Enabled]"));
            Assert.AreEqual(String.Empty, target.parse("[vsCE events.Pre.item(1).Enabled = false]"));
            Assert.AreEqual("false", target.parse("[vsCE events.Pre.item(1).Enabled]"));

            Assert.AreEqual("false", target.parse("[vsCE events.Pre.item(\"Name2\").Enabled]"));
            Assert.AreEqual(String.Empty, target.parse("[vsCE events.Pre.item(\"Name2\").Enabled = true]"));
            Assert.AreEqual("true", target.parse("[vsCE events.Pre.item(\"Name2\").Enabled]"));
        }