コード例 #1
0
 public TestScenario()
 {
     variables             = new BindingVariableList <ScenarioVariable <string>, string>();
     lists                 = new BindingVariableList <ScenarioVariable <string[]>, string[]>();
     tables                = new BindingVariableList <ScenarioTable, DataTable>();
     rootTestCase          = new FolderTestCase();
     rootTestCase.Scenario = this;
     rootTestCase.Name     = "Unknown Scenario";
     filename              = "Unknown Scenario.scn";
 }
コード例 #2
0
 private void SetExitOnErrorRec(FolderTestCase testcase)
 {
     foreach (TestCase child in testcase.Children)
     {
         child.ExitOnError = true;
         if (child is FolderTestCase)
         {
             SetExitOnErrorRec((FolderTestCase)child);
         }
     }
 }
コード例 #3
0
        public override object Clone()
        {
            FolderTestCase result = (FolderTestCase)base.Clone();

            result._children = result._children.Select(child => {
                TestCase newChild = (TestCase)child.Clone();
                newChild.Parent   = result;

                return(newChild);
            }).ToList();

            return(result);
        }
コード例 #4
0
        private void SetDependantsRecursively(TestCase testcase)
        {
            testcase.ID = TestCase.maxID++;
            FolderTestCase folder = testcase as FolderTestCase;

            if (folder != null && folder.Children != null)
            {
                foreach (TestCase child in folder.Children)
                {
                    child.Parent   = folder;
                    child.Scenario = this;
                    SetDependantsRecursively(child);
                }
            }
        }