public static DrtTest DRT_MakeTest(XamlTestSuite suiteInstance, XamlTestInfoBlock testBlk) { DrtTest drtTest = null; string name = testBlk.Name; if (testBlk.TestDelegate != null) { SimpleTest test = testBlk.TestDelegate; drtTest = new DrtTest(() => suiteInstance.DRT_TestValidator( test, testBlk.ExpectedExceptionType)); } else { string xamlString = testBlk.XamlString; XamlStringParser loader = testBlk.StringParserDelegate; PostTreeValidator validator = testBlk.TreeValidatorDelegate; Type expectedExceptionType = testBlk.ExpectedExceptionType; drtTest = new DrtTest(() => suiteInstance.DRT_XamlLoader( name, xamlString, loader, expectedExceptionType, validator)); } return(drtTest); }
public static DrtTest[] FindTests(XamlTestSuite suiteInstance) { List <DrtTest> drts = new List <DrtTest>(); foreach (XamlTestInfoBlock testBlk in TestFinder.XamlTestBlocks(suiteInstance, true)) { DrtTest drtTest = DRT_MakeTest(suiteInstance, testBlk); drts.Add(drtTest); } return(drts.ToArray <DrtTest>()); }