Пример #1
0
        public static ITestRun GetTestRunWithStatus(TestRunStatuses status, params string[] rules)
        {
            var workflow = new TestWorkflow(TestLabCollection.TestLabs.First())
            {
                Name = "workflow 01"
            };

            workflow.SetTestLab(TestLabCollection.TestLabs.First());
            WorkflowCollection.Workflows.Add(workflow);
            var testRun = new TestRun {
                Name = "test run 03", Status = status
            };

            testRun.SetWorkflow(workflow);
            TestRunQueue.TestRuns.Add(testRun);
            var taskId = 0;

            if (null != rules)
            {
                // 20150904
                rules.ToList().ForEach(rule => TaskPool.Tasks.Add(new TestTask {
                    Id = ++taskId, Rule = rule, WorkflowId = workflow.Id, TestRunId = testRun.Id
                }));
            }
            // rules.ToList().ForEach(rule => TaskPool.Tasks.Add(new TestTask (TestTaskRuntimeTypes.Powershell) { Id = ++taskId, Rule = rule, WorkflowId = workflow.Id, TestRunId = testRun.Id }));

            return(testRun);
        }
Пример #2
0
 public static void GetAnotherTestRunWithStatus(TestRunStatuses status, ITestWorkflow workflow)
 {
     var testRun = new TestRun {
         Name = "test run the second",
         Status = status
     };
     testRun.SetWorkflow(workflow);
     TestRunQueue.TestRuns.Add(testRun);
 }
Пример #3
0
 public static ITestRun GetTestRunWithStatus(TestRunStatuses status)
 {
     var workflow = new TestWorkflow(TestLabCollection.TestLabs.First()) { Name = "workflow 01" };
     workflow.SetTestLab(TestLabCollection.TestLabs.First());
     WorkflowCollection.Workflows.Add(workflow);
     var testRun = new TestRun { Name = "test run 03", Status = status };
     testRun.SetWorkflow(workflow);
     TestRunQueue.TestRuns.Add(testRun);
     return testRun;
 }
Пример #4
0
        public static void GetAnotherTestRunWithStatus(TestRunStatuses status, ITestWorkflow workflow)
        {
            var testRun = new TestRun {
                Name   = "test run the second",
                Status = status
            };

            testRun.SetWorkflow(workflow);
            TestRunQueue.TestRuns.Add(testRun);
        }
Пример #5
0
 public static ITestRun GetTestRunWithStatus(TestRunStatuses status, params string[] rules)
 {
     var workflow = new TestWorkflow(TestLabCollection.TestLabs.First()) { Name = "workflow 01" };
     workflow.SetTestLab(TestLabCollection.TestLabs.First());
     WorkflowCollection.Workflows.Add(workflow);
     var testRun = new TestRun { Name = "test run 03", Status = status };
     testRun.SetWorkflow(workflow);
     TestRunQueue.TestRuns.Add(testRun);
     var taskId = 0;
     if (null != rules)
         // 20150904
         rules.ToList().ForEach(rule => TaskPool.Tasks.Add(new TestTask { Id = ++taskId, Rule = rule, WorkflowId = workflow.Id, TestRunId = testRun.Id }));
         // rules.ToList().ForEach(rule => TaskPool.Tasks.Add(new TestTask (TestTaskRuntimeTypes.Powershell) { Id = ++taskId, Rule = rule, WorkflowId = workflow.Id, TestRunId = testRun.Id }));
     
     return testRun;
 }
Пример #6
0
 void SetWorkflow(ITestRunCommand testRunCommand, TestRun testRun)
 {
     testRun.SetWorkflow(WorkflowCollection.Workflows.First(wfl => wfl.Name == testRunCommand.WorkflowName));
     TestLabCollection.TestLabs.First(testLab => testLab.Id == testRun.TestLabId).Status = TestLabStatuses.Busy;
 }
Пример #7
0
 void SetWorkflow(ITestRunCommand testRunCommand, TestRun testRun)
 {
     testRun.SetWorkflow(WorkflowCollection.Workflows.First(wfl => wfl.Name == testRunCommand.WorkflowName));
     TestLabCollection.TestLabs.First(testLab => testLab.Id == testRun.TestLabId).Status = TestLabStatuses.Busy;
 }