public void StSlnPMapTest4() { var target = new BuildComponentProjectsStub(); Assert.Equal(EXIST_GUID, target.Eval("[Build solution.current.GuidList]")); Assert.Equal(EXIST_GUID, target.Eval("[Build solution.path(\"stub.sln\").GuidList]")); }
public void ProjectsMapTest3() { var target = new BuildComponentProjectsStub(new NullBuildEnv() { IsOpenedSolution = true, SolutionFile = "path\\to.sln", }); target.SMap.SetPrj(EXIST_GUID, "Project1", "path\\to.sln", target.SMap.Project1Type); bool h(string l1, string l2) { Assert.Equal("Project1", target.Eval(string.Format("[Build solution.{0}.{1}.name.RightProperty]", l1, l2))); Assert.Equal("path\\to.sln", target.Eval(string.Format("[Build solution.{0}.{1}.path.RightProperty]", l1, l2))); Assert.Equal(EXIST_GUID, target.Eval(string.Format("[Build solution.{0}.{1}.guid.RightProperty]", l1, l2))); Assert.Equal(target.SMap.Project1Type, target.Eval(string.Format("[Build solution.{0}.{1}.type.RightProperty]", l1, l2))); return(true); } Assert.Throws <NotSupportedOperationException>(() => h("current", "First")); Assert.Throws <NotSupportedOperationException>(() => h("current", "Last")); Assert.Throws <NotSupportedOperationException>(() => h("current", "FirstRaw")); Assert.Throws <NotSupportedOperationException>(() => h("current", "LastRaw")); Assert.Throws <NotSupportedOperationException>(() => h("current", "projectBy(\"" + EXIST_GUID + "\")")); Assert.Throws <NotSupportedOperationException>(() => h("path(\"path\\to.sln\")", "First")); Assert.Throws <NotSupportedOperationException>(() => h("path(\"path\\to.sln\")", "Last")); Assert.Throws <NotSupportedOperationException>(() => h("path(\"path\\to.sln\")", "FirstRaw")); Assert.Throws <NotSupportedOperationException>(() => h("path(\"path\\to.sln\")", "LastRaw")); Assert.Throws <NotSupportedOperationException>(() => h("path(\"path\\to.sln\")", "projectBy(\"" + EXIST_GUID + "\")")); }
public void StTypeTest2() { var target = new BuildComponentProjectsStub(); Assert.Throws <IncorrectNodeException>(() => target.Eval("[Build type = true]") ); }
public void StSlnPMapTest5() { var target = new BuildComponentProjectsStub(); Assert.Throws <ArgumentException>(() => Assert.Equal(Value.Empty, target.Eval("[Build solution.current.projectBy()]")) ); }
public void StSolutionTest3() { var target = new BuildComponentProjectsStub(); Assert.Throws <IncorrectNodeException>(() => Assert.Equal(Value.Empty, target.Eval("[Build solution.NotRealProperty]")) ); }
public void StSlnPMapTest3() { var target = new BuildComponentProjectsStub(); Assert.Throws <KeyNotFoundException>(() => Assert.Equal(Value.Empty, target.Eval("[Build solution.current.projectBy(\"" + NOTEXIST_GUID + "\")]")) ); }
public void StProjectConfTest2() { var target = new BuildComponentProjectsStub(); Assert.Throws <IncorrectNodeException>(() => target.Eval("[Build projects.find(\"project1\").NotExist = true]") ); }
public void StProjectConfTest1() { var target = new BuildComponentProjectsStub(); Assert.Throws <IncorrectSyntaxException>(() => target.Eval("[Build projects.find(\"project1\").IsBuildable = val]") ); }
public void StProjectsTest2() { var target = new BuildComponentProjectsStub(); Assert.Throws <IncorrectSyntaxException>(() => target.Eval("[Build projects.find(\"NotExist\").]") ); }
public void StSolutionTest1() { var target = new BuildComponentProjectsStub(); Assert.Throws <IncorrectNodeException>(() => target.Eval("[Build solution.current]") ); Assert.Throws <IncorrectNodeException>(() => target.Eval("[Build solution.path(\"path.sln\")]") ); }
public void ProjectsMapTest2() { var target = new BuildComponentProjectsStub(new NullBuildEnv() { IsOpenedSolution = true, SolutionFile = "stub.sln", }); Assert.Throws <IncorrectNodeException>(() => target.Eval("[Build solution.path(\"stub.sln\").First.NotRealProperty]") ); Assert.Throws <IncorrectNodeException>(() => target.Eval("[Build solution.current.First.NotRealProperty]") ); }
public void StSlnPMapTest2() { var target = new BuildComponentProjectsStub(); Assert.Throws <IncorrectNodeException>(() => target.Eval("[Build solution.path(\"stub.sln\").First]") ); Assert.Throws <IncorrectNodeException>(() => target.Eval("[Build solution.path(\"stub.sln\").Last]") ); Assert.Throws <IncorrectNodeException>(() => target.Eval("[Build solution.path(\"stub.sln\").LastRaw]") ); Assert.Throws <IncorrectNodeException>(() => target.Eval("[Build solution.path(\"stub.sln\").projectBy(\"" + EXIST_GUID + "\")]") ); }
public void StSlnPMapTest1() { var target = new BuildComponentProjectsStub(); Assert.Throws <IncorrectNodeException>(() => target.Eval("[Build solution.current.NotExistProperty]") ); Assert.Throws <IncorrectNodeException>(() => target.Eval("[Build solution.current.First]") ); Assert.Throws <IncorrectNodeException>(() => target.Eval("[Build solution.current.Last]") ); Assert.Throws <IncorrectNodeException>(() => target.Eval("[Build solution.current.LastRaw]") ); Assert.Throws <IncorrectNodeException>(() => target.Eval("[Build solution.current.projectBy(\"" + EXIST_GUID + "\")]") ); }
public void IsDeployableTest1() { var target = new BuildComponentProjectsStub(); Assert.Equal(Value.Empty, target.Eval("[Build projects.find(\"project1\").IsDeployable = true]")); }