public override int ExecuteVariation(CXmlDriverParam param) { CError.WriteLine("Test Parameters : "); CError.WriteLine(this.CurVariation.Desc); CFactory f = null; string factoryToInvoke = param.SelectExistingValue("DriverFunction"); switch (factoryToInvoke) //seperates whether to call Reader or Writer { case "XmlReader": f = new CReaderFactory(); break; case "XmlWriter": f = new CWriterFactory(); break; default: throw new CTestFailedException("Invalid XmlDriverScenario passed in : " + factoryToInvoke); } CFactory.TestState testResult = f.TestVariation(param); if (testResult == CFactory.TestState.Pass) { return(TEST_PASS); } else if (testResult == CFactory.TestState.Skip) { return(TEST_SKIPPED); } return(TEST_FAIL); }
public override int ExecuteVariation(CXmlDriverParam param) { CError.WriteLine("Test Parameters : "); CError.WriteLine(this.CurVariation.Desc); CFactory f = null; string factoryToInvoke = param.SelectExistingValue("DriverFunction"); switch (factoryToInvoke) //seperates whether to call Reader or Writer { case "XmlReader": f = new CReaderFactory(); break; case "XmlWriter": f = new CWriterFactory(); break; default: throw new CTestFailedException("Invalid XmlDriverScenario passed in : " + factoryToInvoke); } CFactory.TestState testResult = f.TestVariation(param); if (testResult == CFactory.TestState.Pass) return TEST_PASS; else if (testResult == CFactory.TestState.Skip) return TEST_SKIPPED; return TEST_FAIL; }