private static IEnumerable <object[]> GenerateTestCasesForModule(CTestModule module) { foreach (OLEDB.Test.ModuleCore.XunitTestCase testCase in module.TestCases()) { yield return(new object[] { testCase }); } }
public virtual tagVARIATION_STATUS ExecuteVariation(int index) { //Track the test case we're in CTestModule testmodule = this.TestModule; if (testmodule != null) { testmodule.CurTestCase = this; } //Track which variation were executing _curvariation = (CVariation)Children[index]; int result = TEST_FAIL; if (_curvariation.Skipped || !_curvariation.Implemented) { //Skipped result = TEST_SKIPPED; } else { //Execute result = ExecuteVariation(index, _curvariation.Param); } //Before exiting make sure we reset our CurVariation to null, to prevent //incorrect uses of CurVariation within the TestCase, but not actually a running //variation. This will only be valid within a function with a //[Variation] attribute... _curvariation = null; return((tagVARIATION_STATUS)result); }
internal CXmlDriverErrorTestCase(string name, string desc, Exception e, tagVARIATION_STATUS returnCode, CTestModule testModule) : base(testModule, (desc.Length > 1000 ? desc.Substring(0, 1000) + "..." : desc)) { this.Name = name; _exception = e; _returnCode = returnCode; }
public CTestCase(CTestModule parent, string desc) : base(desc) { Parent = parent; }
public CXmlDriverEngine(CTestModule testModule) { _testModule = testModule; _testModuleParams = new List<CXmlDriverParam>(); }
internal CXmlDriverEmptyTestCase(string name, string desc, string message, CTestModule testModule) : base(testModule, desc) { this.Name = name; _message = message; }
internal CXmlDriverErrorTestCase(string name, string desc, Exception e, CTestModule testModule) : this(name, desc, e, tagVARIATION_STATUS.eVariationStatusAborted, testModule) { }