diff options
Diffstat (limited to 'mcs/nunit/src/NUnitCore/TestFailure.cs')
-rw-r--r-- | mcs/nunit/src/NUnitCore/TestFailure.cs | 55 |
1 files changed, 0 insertions, 55 deletions
diff --git a/mcs/nunit/src/NUnitCore/TestFailure.cs b/mcs/nunit/src/NUnitCore/TestFailure.cs deleted file mode 100644 index 4dad5bd02bd..00000000000 --- a/mcs/nunit/src/NUnitCore/TestFailure.cs +++ /dev/null @@ -1,55 +0,0 @@ -namespace NUnit.Framework
-{
- using System;
- using System.Diagnostics;
- using System.IO;
- using System.Text;
-
- /// <summary>
- /// A <c>TestFailure</c> collects a failed test together with
- /// the caught exception.
- /// </summary>
- /// <seealso cref="TestResult"/>
- public class TestFailure : MarshalByRefObject
- {
- private readonly ITest fFailedTest;
- private readonly Exception fThrownException;
-
- /// <summary>
- /// Constructs a TestFailure with the given test and exception.
- /// </summary>
- public TestFailure(ITest theFailedTest, Exception theThrownException)
- {
- if(theFailedTest==null)
- throw new ArgumentNullException("theFailedTest");
- if(theThrownException==null)
- throw new ArgumentNullException("theThrownException");
- this.fFailedTest = theFailedTest;
- this.fThrownException = theThrownException;
- }
-
- /// <value>Gets the failed test.</value>
- public ITest FailedTest
- {
- get { return this.fFailedTest; }
- }
-
- /// <value>True if it's a failure, false if error.</value>
- public bool IsFailure
- {
- get { return this.fThrownException is AssertionFailedError; }
- }
-
- /// <value>Gets the thrown exception.</value>
- public Exception ThrownException
- {
- get { return this.fThrownException; }
- }
-
- /// <summary>Returns a short description of the failure.</summary>
- public override string ToString()
- {
- return this.fFailedTest + ": " + this.fThrownException.Message;
- }
- }
-}
\ No newline at end of file |