public override tagVARIATION_STATUS Execute() { tagVARIATION_STATUS res = (tagVARIATION_STATUS)TEST_FAIL; try { if (!CheckSkipped()) { return((tagVARIATION_STATUS)TEST_SKIPPED); } CXmlDriverScenario scenario = (CXmlDriverScenario)Parent; res = (tagVARIATION_STATUS)scenario.ExecuteVariation(XmlDriverParam); } catch (CTestSkippedException e) { res = (tagVARIATION_STATUS)HandleException(e); } catch (Exception e) { Console.WriteLine(e); res = (tagVARIATION_STATUS)HandleException(e); } return(res); }
//Constructor internal CXmlDriverVariation(CXmlDriverScenario testCase, string name, string description, int id, int pri, CXmlDriverParam xmlDriverParams) : base(testCase) { _xmlDriverParams = xmlDriverParams; // use name as a description if provided if (name != null) this.Desc = name; else this.Desc = description; this.Name = name; this.Pri = pri; this.id = id; }
//Constructor internal CXmlDriverVariation(CXmlDriverScenario testCase, string name, string description, int id, int pri, CXmlDriverParam xmlDriverParams) : base(testCase) { _xmlDriverParams = xmlDriverParams; // use name as a description if provided if (name != null) { this.Desc = name; } else { this.Desc = description; } this.Name = name; this.Pri = pri; this.id = id; }
// Creates test case class private CXmlDriverScenario CreateTestCase(string name, string desc, CXmlDriverParam param) { CXmlDriverScenario tmp = null; try { //Create this class (call the constructor with no arguments) tmp = new CRWFactoryDriverScenario(); tmp.Name = name; tmp.Desc = desc; tmp.TestModule = TestModule; tmp.XmlDriverParam = param; if (_isRequiredCultureInfoNeedToBeSet) { tmp.RequiredCultureInfo = _requiredCultureInfo; } } catch (Exception e) { throw new CXmlDriverException("XmlDriver: CreateIntance failed for TestCase '" + "CRWFactoryDriverScenario" /*type.Name*/ + "' (" + e.ToString() + ")"); } return(tmp); }