コード例 #1
0
ファイル: TestFactory.cs プロジェクト: lddd99/guiatuomation
        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
ファイル: TestFactory.cs プロジェクト: lddd99/guiatuomation
        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;
 }