Description of TLSrvGetProjectCommand.
Inheritance: TLSrvCommand
        private System.Collections.Generic.List<TestProject> getProjectCollection(
            System.Collections.Generic.List<TestProject> listOfProjects,
            bool makeFail)
        {
            TLProjectCmdletBase cmdlet = new TLProjectCmdletBase();
            cmdlet.Name = null;
            
            TLAddinData.CurrentTestLinkConnection =
                FakeTestLinkFactory.GetTestLinkWithProjects(listOfProjects);
            
            if (makeFail) {
                TLAddinData.CurrentTestLinkConnection = null;
            }
//cmdlet.WriteTrace(cmdlet, "getProjectCollection: 003");
            TLSrvGetProjectCommand command =
                new TLSrvGetProjectCommand(cmdlet);
            command.Execute();
//cmdlet.WriteTrace(cmdlet, "getProjectCollection: 004");
            System.Collections.Generic.List<TestProject> resultList =
                new System.Collections.Generic.List<TestProject>();
//cmdlet.WriteTrace(cmdlet, "getProjectCollection: 005");
//cmdlet.WriteTrace(cmdlet, "IsInitialized: " + PSTestLib.UnitTestOutput.IsInitialized.ToString());
            foreach (object tpr in PSTestLib.UnitTestOutput.LastOutput) {
//cmdlet.WriteTrace(cmdlet, "getProjectCollection: 006");
                resultList.Add((TestProject)tpr);
//cmdlet.WriteTrace(cmdlet, "getProjectCollection: 007");
            }

            return resultList;
        }
示例#2
0
 protected override void BeginProcessing()
 {
     CheckCmdletParameters();
     
     var command = new TLSrvGetProjectCommand(this);
     command.Execute();
 }
示例#3
0
        private System.Collections.Generic.List<TestProject> getProject(
            System.Collections.Generic.List<TestProject> listOfProjects,
            string[] names,
            bool makeFail)
        {
            TLProjectCmdletBase cmdlet = new TLProjectCmdletBase();
            cmdlet.Name = names;
            
            TLAddinData.CurrentTestLinkConnection =
                FakeTestLinkFactory.GetTestLinkWithProjects(listOfProjects);

            if (makeFail) {
                TLAddinData.CurrentTestLinkConnection = null;
            }
//cmdlet.WriteTrace(cmdlet, "getProject 00001");
            TLSrvGetProjectCommand command =
                new TLSrvGetProjectCommand(cmdlet);
            command.Execute();
//cmdlet.WriteTrace(cmdlet, "getProject 00002");
            System.Collections.Generic.List<TestProject> resultList =
                new System.Collections.Generic.List<TestProject>();
//cmdlet.WriteTrace(cmdlet, "getProject 00003");
            foreach (object tpr in PSTestLib.UnitTestOutput.LastOutput) {
//cmdlet.WriteTrace(cmdlet, "getProject 00004_1");
                resultList.Add((Meyn.TestLink.TestProject)tpr);
//cmdlet.WriteTrace(cmdlet, "getProject 00004_2");
            }

            return resultList;
        }
        List<TestProject> getProjectCollection(
            List<TestProject> listOfProjects,
            string[] names,
            string[] ids,
            bool makeFail)
        {
            var cmdlet = new GetTLProjectCommand();
            cmdlet.Name = names;
            cmdlet.Id = ids;
            
            TLAddinData.CurrentTestLinkConnection =
                FakeTestLinkFactory.GetTestLinkWithProjects(listOfProjects);
            
            if (makeFail)
                TLAddinData.CurrentTestLinkConnection = null;
            
            var command = new TLSrvGetProjectCommand(cmdlet);
            command.Execute();

            var resultList = new List<TestProject>();

            foreach (object tpr in UnitTestOutput.LastOutput) {

                resultList.Add((TestProject)tpr);

            }

            return resultList;
        }
示例#5
0
        protected override void BeginProcessing()
        {
            CheckCmdletParameters();

            var command = new TLSrvGetProjectCommand(this);

            command.Execute();
        }