// Run the test case, and pass its results to a given object. // This also implements the "Test" interface. public void Run(TestResult result) { result.StartTest(this, false); Setup(); try { RunTest(); } catch(TestAssertFailed assert) { result.AddFailure(this, assert); } catch(TestStop) { // Something wants us to stop testing immediately. throw; } catch(Exception e) { result.AddException(this, e); } finally { Cleanup(); } result.EndTest(this, false); }
// Run the test case, and pass its results to a given object. // This also implements the "Test" interface. public void Run(TestResult result) { result.StartTest(this, false); Setup(); try { RunTest(); } catch (TestAssertFailed assert) { result.AddFailure(this, assert); } catch (TestStop) { // Something wants us to stop testing immediately. throw; } catch (Exception e) { result.AddException(this, e); } finally { Cleanup(); } result.EndTest(this, false); }
// Implement the "Test" interface. public void Run(TestResult result) { int posn; result.StartTest(this, true); for (posn = 0; posn < tests.Length; ++posn) { ((Test)(tests[posn])).Run(result); } result.EndTest(this, true); }
// Implement the "Test" interface. public void Run(TestResult result) { int posn; result.StartTest(this, true); for(posn = 0; posn < tests.Length; ++posn) { ((Test)(tests[posn])).Run(result); } result.EndTest(this, true); }