Example #1
0
        public void stSlnPMapTest2()
        {
            var target = new BuildComponentAccessor(Env);

            try {
                target.parse("[Build solution.path(\"stub.sln\").First]");
                Assert.Fail("1");
            }
            catch (Exception ex) { Assert.IsTrue(ex.GetType() == typeof(IncorrectNodeException), ex.GetType().ToString()); }

            try {
                target.parse("[Build solution.path(\"stub.sln\").Last]");
                Assert.Fail("2");
            }
            catch (Exception ex) { Assert.IsTrue(ex.GetType() == typeof(IncorrectNodeException), ex.GetType().ToString()); }

            try {
                target.parse("[Build solution.path(\"stub.sln\").LastRaw]");
                Assert.Fail("3");
            }
            catch (Exception ex) { Assert.IsTrue(ex.GetType() == typeof(IncorrectNodeException), ex.GetType().ToString()); }

            try {
                target.parse("[Build solution.path(\"stub.sln\").projectBy(\"" + EXIST_GUID + "\")]");
                Assert.Fail("4");
            }
            catch (Exception ex) { Assert.IsTrue(ex.GetType() == typeof(IncorrectNodeException), ex.GetType().ToString()); }
        }
Example #2
0
        public void stSlnPMapTest4()
        {
            BuildComponent target = new BuildComponentAccessor(Env);

            Assert.AreEqual(EXIST_GUID, target.parse("[Build solution.current.GuidList]"));
            Assert.AreEqual(EXIST_GUID, target.parse("[Build solution.path(\"stub.sln\").GuidList]"));
        }
Example #3
0
        public void projectsMapTest1()
        {
            BuildComponent target = new BuildComponentAccessor(Env);

            Func <string, string, bool> h = delegate(string l1, string l2)
            {
                Assert.AreEqual("Project1", target.parse(String.Format("[Build solution.{0}.{1}.name]", l1, l2)));
                Assert.AreEqual("path\\to.sln", target.parse(String.Format("[Build solution.{0}.{1}.path]", l1, l2)));
                Assert.AreEqual(EXIST_GUID, target.parse(String.Format("[Build solution.{0}.{1}.guid]", l1, l2)));
                Assert.AreEqual("{22222222-2222-2222-2222-222222222222}", target.parse(String.Format("[Build solution.{0}.{1}.type]", l1, l2)));
                return(true);
            };

            h("current", "First");
            h("current", "Last");
            h("current", "FirstRaw");
            h("current", "LastRaw");
            h("current", "projectBy(\"" + EXIST_GUID + "\")");

            h("path(\"path\\to.sln\")", "First");
            h("path(\"path\\to.sln\")", "Last");
            h("path(\"path\\to.sln\")", "FirstRaw");
            h("path(\"path\\to.sln\")", "LastRaw");
            h("path(\"path\\to.sln\")", "projectBy(\"" + EXIST_GUID + "\")");
        }
Example #4
0
        public void stCancelTest3()
        {
            BuildComponentAccessor target = new BuildComponentAccessor();

            Assert.AreEqual(Value.Empty, target.parse("[Build cancel = true]"));
            Assert.AreEqual(Value.Empty, target.parse("[Build cancel = 1]"));
            Assert.AreEqual(Value.Empty, target.parse("[Build cancel = false]"));
            Assert.AreEqual(Value.Empty, target.parse("[Build cancel = 0]"));
            Assert.AreEqual(Value.Empty, target.parse("[Build cancel = true ] "));
        }
Example #5
0
        public void stCancelTest5()
        {
            var target = new BuildComponentAccessor();

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

            try {
                target.parse("[Build cancel : true]");
                Assert.Fail("2");
            }
            catch (Exception ex) { Assert.IsTrue(ex.GetType() == typeof(IncorrectNodeException), ex.GetType().ToString()); }
        }
Example #6
0
        public void stSolutionTest1()
        {
            var target = new BuildComponentAccessor(Env);

            try {
                target.parse("[Build solution.current]");
                Assert.Fail("1");
            }
            catch (Exception ex) { Assert.IsTrue(ex.GetType() == typeof(IncorrectNodeException), ex.GetType().ToString()); }

            try {
                target.parse("[Build solution.path(\"path.sln\")]");
                Assert.Fail("2");
            }
            catch (Exception ex) { Assert.IsTrue(ex.GetType() == typeof(IncorrectNodeException), ex.GetType().ToString()); }
        }
Example #7
0
        public void projectsMapTest2()
        {
            var target = new BuildComponentAccessor(Env);

            try {
                target.parse("[Build solution.path(\"stub.sln\").First.NotRealProperty]");
                Assert.Fail("1");
            }
            catch (Exception ex) { Assert.IsTrue(ex.GetType() == typeof(IncorrectNodeException), ex.GetType().ToString()); }

            try {
                target.parse("[Build solution.current.First.NotRealProperty]");
                Assert.Fail("2");
            }
            catch (Exception ex) { Assert.IsTrue(ex.GetType() == typeof(IncorrectNodeException), ex.GetType().ToString()); }
        }
Example #8
0
        public void projectsMapTest3()
        {
            BuildComponent target = new BuildComponentAccessor(Env);

            Func <string, string, bool> h = delegate(string l1, string l2) {
                Assert.AreEqual("Project1", target.parse(String.Format("[Build solution.{0}.{1}.name.RightProperty]", l1, l2)));
                Assert.AreEqual("path\\to.sln", target.parse(String.Format("[Build solution.{0}.{1}.path.RightProperty]", l1, l2)));
                Assert.AreEqual(EXIST_GUID, target.parse(String.Format("[Build solution.{0}.{1}.guid.RightProperty]", l1, l2)));
                Assert.AreEqual("{22222222-2222-2222-2222-222222222222}", target.parse(String.Format("[Build solution.{0}.{1}.type.RightProperty]", l1, l2)));
                return(true);
            };

            try { h("current", "First"); Assert.Fail("1"); } catch (Exception ex) { Assert.IsTrue(ex.GetType() == typeof(NotSupportedOperationException), ex.GetType().ToString()); }
            try { h("current", "Last"); Assert.Fail("2"); } catch (Exception ex) { Assert.IsTrue(ex.GetType() == typeof(NotSupportedOperationException), ex.GetType().ToString()); }
            try { h("current", "FirstRaw"); Assert.Fail("3"); } catch (Exception ex) { Assert.IsTrue(ex.GetType() == typeof(NotSupportedOperationException), ex.GetType().ToString()); }
            try { h("current", "LastRaw"); Assert.Fail("4"); } catch (Exception ex) { Assert.IsTrue(ex.GetType() == typeof(NotSupportedOperationException), ex.GetType().ToString()); }
            try { h("current", "projectBy(\"" + EXIST_GUID + "\")"); Assert.Fail("5"); } catch (Exception ex) { Assert.IsTrue(ex.GetType() == typeof(NotSupportedOperationException), ex.GetType().ToString()); }

            try { h("path(\"path\\to.sln\")", "First"); Assert.Fail("6"); } catch (Exception ex) { Assert.IsTrue(ex.GetType() == typeof(NotSupportedOperationException), ex.GetType().ToString()); }
            try { h("path(\"path\\to.sln\")", "Last"); Assert.Fail("7"); } catch (Exception ex) { Assert.IsTrue(ex.GetType() == typeof(NotSupportedOperationException), ex.GetType().ToString()); }
            try { h("path(\"path\\to.sln\")", "FirstRaw"); Assert.Fail("8"); } catch (Exception ex) { Assert.IsTrue(ex.GetType() == typeof(NotSupportedOperationException), ex.GetType().ToString()); }
            try { h("path(\"path\\to.sln\")", "LastRaw"); Assert.Fail("9"); } catch (Exception ex) { Assert.IsTrue(ex.GetType() == typeof(NotSupportedOperationException), ex.GetType().ToString()); }
            try { h("path(\"path\\to.sln\")", "projectBy(\"" + EXIST_GUID + "\")"); Assert.Fail("10"); } catch (Exception ex) { Assert.IsTrue(ex.GetType() == typeof(NotSupportedOperationException), ex.GetType().ToString()); }
        }
Example #9
0
        public void stProjectsTest1()
        {
            BuildComponentAccessor target = new BuildComponentAccessor();

            target.parse("[Build projects.find(name)]");
        }
Example #10
0
        public void stCancelTest4()
        {
            BuildComponentAccessor target = new BuildComponentAccessor();

            target.parse("[Build cancel = 1true]");
        }
 public void parseTest()
 {
     BuildComponentAccessor target = new BuildComponentAccessor();
     target.parse("[Build UnitTestChecking = true]");
 }
 public void stCancelTest2()
 {
     BuildComponentAccessor target = new BuildComponentAccessor();
     target.parse("Build cancel = true");
 }
        public void projectsMapTest1()
        {
            BuildComponent target = new BuildComponentAccessor(Env);

            Func<string, string, bool> h = delegate(string l1, string l2)
            {
                Assert.AreEqual("Project1", target.parse(String.Format("[Build solution.{0}.{1}.name]", l1, l2)));
                Assert.AreEqual("path\\to.sln", target.parse(String.Format("[Build solution.{0}.{1}.path]", l1, l2)));
                Assert.AreEqual(EXIST_GUID, target.parse(String.Format("[Build solution.{0}.{1}.guid]", l1, l2)));
                Assert.AreEqual("{22222222-2222-2222-2222-222222222222}", target.parse(String.Format("[Build solution.{0}.{1}.type]", l1, l2)));
                return true;
            };

            h("current", "First");
            h("current", "Last");
            h("current", "FirstRaw");
            h("current", "LastRaw");
            h("current", "projectBy(\"" + EXIST_GUID + "\")");

            h("path(\"path\\to.sln\")", "First");
            h("path(\"path\\to.sln\")", "Last");
            h("path(\"path\\to.sln\")", "FirstRaw");
            h("path(\"path\\to.sln\")", "LastRaw");
            h("path(\"path\\to.sln\")", "projectBy(\"" + EXIST_GUID + "\")");
        }
Example #14
0
 public void stSlnPMapTest3()
 {
     BuildComponent target = new BuildComponentAccessor(Env);
     Assert.AreEqual(Value.Empty, target.parse("[Build solution.current.projectBy(\"" + NOTEXIST_GUID + "\")]"));
 }
Example #15
0
        public void stSlnPMapTest5()
        {
            BuildComponent target = new BuildComponentAccessor(Env);

            Assert.AreEqual(Value.Empty, target.parse("[Build solution.current.projectBy()]"));
        }
        public void projectsMapTest2()
        {
            try {
                BuildComponent target = new BuildComponentAccessor(Env);
                Assert.AreEqual(String.Empty, target.parse("[Build solution.path(\"stub.sln\").First.NotRealProperty]"));
                Assert.Fail("1");
            }
            catch(OperationNotFoundException) {
                Assert.IsTrue(true);
            }

            try {
                BuildComponent target = new BuildComponentAccessor(Env);
                Assert.AreEqual(String.Empty, target.parse("[Build solution.current.First.NotRealProperty]"));
                Assert.Fail("2");
            }
            catch(OperationNotFoundException) {
                Assert.IsTrue(true);
            }
        }
Example #17
0
        public void stCancelTest5()
        {
            var target = new BuildComponentAccessor();

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

            try {
                target.parse("[Build cancel : true]");
                Assert.Fail("2");
            }
            catch(Exception ex) { Assert.IsTrue(ex.GetType() == typeof(IncorrectNodeException), ex.GetType().ToString()); }
        }
        public void stSlnPMapTest2()
        {
            try {
                BuildComponent target = new BuildComponentAccessor(Env);
                Assert.AreEqual(String.Empty, target.parse("[Build solution.path(\"stub.sln\").First]"));
                Assert.Fail("1");
            }
            catch(OperationNotFoundException) {
                Assert.IsTrue(true);
            }

            try {
                BuildComponent target = new BuildComponentAccessor(Env);
                Assert.AreEqual(String.Empty, target.parse("[Build solution.path(\"stub.sln\").Last]"));
                Assert.Fail("2");
            }
            catch(OperationNotFoundException) {
                Assert.IsTrue(true);
            }

            try {
                BuildComponent target = new BuildComponentAccessor(Env);
                Assert.AreEqual(String.Empty, target.parse("[Build solution.path(\"stub.sln\").LastRaw]"));
                Assert.Fail("3");
            }
            catch(OperationNotFoundException) {
                Assert.IsTrue(true);
            }

            try {
                BuildComponent target = new BuildComponentAccessor(Env);
                Assert.AreEqual(String.Empty, target.parse("[Build solution.path(\"stub.sln\").projectBy(\"" + EXIST_GUID + "\")]"));
                Assert.Fail("4");
            }
            catch(OperationNotFoundException) {
                Assert.IsTrue(true);
            }
        }
 public void stSlnPMapTest4()
 {
     BuildComponent target = new BuildComponentAccessor(Env);
     Assert.AreEqual(EXIST_GUID, target.parse("[Build solution.current.GuidList]"));
     Assert.AreEqual(EXIST_GUID, target.parse("[Build solution.path(\"stub.sln\").GuidList]"));
 }
 public void stProjectsTest1()
 {
     BuildComponentAccessor target = new BuildComponentAccessor();
     target.parse("[Build projects.find(name)]");
 }
 public void stCancelTest4()
 {
     BuildComponentAccessor target = new BuildComponentAccessor();
     target.parse("[Build cancel = 1true]");
 }
 public void stCancelTest3()
 {
     BuildComponentAccessor target = new BuildComponentAccessor();
     Assert.AreEqual(String.Empty, target.parse("[Build cancel = true]"));
     Assert.AreEqual(String.Empty, target.parse("[Build cancel = 1]"));
     Assert.AreEqual(String.Empty, target.parse("[Build cancel = false]"));
     Assert.AreEqual(String.Empty, target.parse("[Build cancel = 0]"));
     Assert.AreEqual(String.Empty, target.parse("[Build cancel = true ] "));
 }
Example #23
0
        public void stSolutionTest1()
        {
            var target = new BuildComponentAccessor(Env);

            try {
                target.parse("[Build solution.current]");
                Assert.Fail("1");
            }
            catch(Exception ex) { Assert.IsTrue(ex.GetType() == typeof(IncorrectNodeException), ex.GetType().ToString()); }

            try {
                target.parse("[Build solution.path(\"path.sln\")]");
                Assert.Fail("2");
            }
            catch(Exception ex) { Assert.IsTrue(ex.GetType() == typeof(IncorrectNodeException), ex.GetType().ToString()); }
        }
 public void stSolutionTest2()
 {
     BuildComponent target = new BuildComponentAccessor(Env);
     Assert.AreEqual(String.Empty, target.parse("[Build solution.path()]"));
 }
Example #25
0
        public void stSolutionTest2()
        {
            BuildComponent target = new BuildComponentAccessor(Env);

            Assert.AreEqual(Value.Empty, target.parse("[Build solution.path()]"));
        }
Example #26
0
        public void parseTest()
        {
            BuildComponentAccessor target = new BuildComponentAccessor();

            target.parse("[Build UnitTestChecking = true]");
        }
Example #27
0
        public void stSlnPMapTest2()
        {
            var target = new BuildComponentAccessor(Env);

            try {
                target.parse("[Build solution.path(\"stub.sln\").First]");
                Assert.Fail("1");
            }
            catch(Exception ex) { Assert.IsTrue(ex.GetType() == typeof(IncorrectNodeException), ex.GetType().ToString()); }

            try {
                target.parse("[Build solution.path(\"stub.sln\").Last]");
                Assert.Fail("2");
            }
            catch(Exception ex) { Assert.IsTrue(ex.GetType() == typeof(IncorrectNodeException), ex.GetType().ToString()); }

            try {
                target.parse("[Build solution.path(\"stub.sln\").LastRaw]");
                Assert.Fail("3");
            }
            catch(Exception ex) { Assert.IsTrue(ex.GetType() == typeof(IncorrectNodeException), ex.GetType().ToString()); }

            try {
                target.parse("[Build solution.path(\"stub.sln\").projectBy(\"" + EXIST_GUID + "\")]");
                Assert.Fail("4");
            }
            catch(Exception ex) { Assert.IsTrue(ex.GetType() == typeof(IncorrectNodeException), ex.GetType().ToString()); }
        }
Example #28
0
        public void stCancelTest2()
        {
            BuildComponentAccessor target = new BuildComponentAccessor();

            target.parse("Build cancel = true");
        }
 public void stSlnPMapTest5()
 {
     BuildComponent target = new BuildComponentAccessor(Env);
     Assert.AreEqual(String.Empty, target.parse("[Build solution.current.projectBy()]"));
 }
        public void projectsMapTest3()
        {
            BuildComponent target = new BuildComponentAccessor(Env);

            Func<string, string, bool> h = delegate(string l1, string l2) {
                Assert.AreEqual("Project1", target.parse(String.Format("[Build solution.{0}.{1}.name.RightProperty]", l1, l2)));
                Assert.AreEqual("path\\to.sln", target.parse(String.Format("[Build solution.{0}.{1}.path.RightProperty]", l1, l2)));
                Assert.AreEqual(EXIST_GUID, target.parse(String.Format("[Build solution.{0}.{1}.guid.RightProperty]", l1, l2)));
                Assert.AreEqual("{22222222-2222-2222-2222-222222222222}", target.parse(String.Format("[Build solution.{0}.{1}.type.RightProperty]", l1, l2)));
                return true;
            };

            try { h("current", "First"); Assert.Fail("1"); } catch(NotSupportedOperationException) { Assert.IsTrue(true); }
            try { h("current", "Last"); Assert.Fail("2"); } catch(NotSupportedOperationException) { Assert.IsTrue(true); }
            try { h("current", "FirstRaw"); Assert.Fail("3"); } catch(NotSupportedOperationException) { Assert.IsTrue(true); }
            try { h("current", "LastRaw"); Assert.Fail("4"); } catch(NotSupportedOperationException) { Assert.IsTrue(true); }
            try { h("current", "projectBy(\"" + EXIST_GUID + "\")"); Assert.Fail("5"); } catch(NotSupportedOperationException) { Assert.IsTrue(true); }

            try { h("path(\"path\\to.sln\")", "First"); Assert.Fail("6"); } catch(NotSupportedOperationException) { Assert.IsTrue(true); }
            try { h("path(\"path\\to.sln\")", "Last"); Assert.Fail("7"); } catch(NotSupportedOperationException) { Assert.IsTrue(true); }
            try { h("path(\"path\\to.sln\")", "FirstRaw"); Assert.Fail("8"); } catch(NotSupportedOperationException) { Assert.IsTrue(true); }
            try { h("path(\"path\\to.sln\")", "LastRaw"); Assert.Fail("9"); } catch(NotSupportedOperationException) { Assert.IsTrue(true); }
            try { h("path(\"path\\to.sln\")", "projectBy(\"" + EXIST_GUID + "\")"); Assert.Fail("10"); } catch(NotSupportedOperationException) { Assert.IsTrue(true); }
        }
        public void stSolutionTest1()
        {
            try {
                BuildComponent target = new BuildComponentAccessor(Env);
                Assert.AreEqual(String.Empty, target.parse("[Build solution.current]"));
                Assert.Fail("1");
            }
            catch(OperationNotFoundException) {
                Assert.IsTrue(true);
            }

            try {
                BuildComponent target = new BuildComponentAccessor(Env);
                Assert.AreEqual(String.Empty, target.parse("[Build solution.path(\"path.sln\")]"));
                Assert.Fail("2");
            }
            catch(OperationNotFoundException) {
                Assert.IsTrue(true);
            }
        }
Example #32
0
        public void projectsMapTest2()
        {
            var target = new BuildComponentAccessor(Env);

            try {
                target.parse("[Build solution.path(\"stub.sln\").First.NotRealProperty]");
                Assert.Fail("1");
            }
            catch(Exception ex) { Assert.IsTrue(ex.GetType() == typeof(IncorrectNodeException), ex.GetType().ToString()); }

            try {
                target.parse("[Build solution.current.First.NotRealProperty]");
                Assert.Fail("2");
            }
            catch(Exception ex) { Assert.IsTrue(ex.GetType() == typeof(IncorrectNodeException), ex.GetType().ToString()); }
        }