// 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);
			}
Example #2
0
 // 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);
 }
Example #3
0
        // 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);
			}