コード例 #1
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);
			}
コード例 #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);
 }
コード例 #3
0
ファイル: TestSuite.cs プロジェクト: ForNeVeR/pnet
        // 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);
        }
コード例 #4
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);
			}