void Instance_StartTestSet(object sender, TestSetEventArgs e) { Console.WriteLine("Test suite: " + e.TestSetInfo.Name); if (e.TestSetInfo.Instance is ReoGridTestSet) { if (this.grid == null) { this.grid = new ReoGridControl() { Bounds = new System.Drawing.Rectangle(0, 0, 500, 400), }; } ((ReoGridTestSet)e.TestSetInfo.Instance).Grid = this.grid; } }
public bool RunTestSet(TestSetInfo testSetInfo, List <string> failList) { testSetInfo.Reset(); var arg = new TestSetEventArgs(testSetInfo); if (StartTestSet != null) { StartTestSet(this, arg); } if (arg.Cancelled) { return(true); } try { if (testSetInfo.Instance is TestSet) { ((TestSet)testSetInfo.Instance).SetUp(); } } catch { } foreach (TestCaseInfo testCaseInfo in testSetInfo.TestCases.OrderBy(tc => tc.Sort)) { RunTestCase(testSetInfo, testCaseInfo, failList); } try { if (testSetInfo.Instance is TestSet) { ((TestSet)testSetInfo.Instance).SetDown(); } } catch { } if (FinishTestSet != null) { FinishTestSet(this, new TestSetEventArgs(testSetInfo)); } return(testSetInfo.IsAllSuccessed); }
void Instance_FinishTestSet(object sender, TestSetEventArgs e) { Console.WriteLine("\t{0} tests, {1} success\r\n", e.TestSetInfo.Count, e.TestSetInfo.Successes); }