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"; }
private void SetExitOnErrorRec(FolderTestCase testcase) { foreach (TestCase child in testcase.Children) { child.ExitOnError = true; if (child is FolderTestCase) { SetExitOnErrorRec((FolderTestCase)child); } } }
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); }
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); } } }