Class TestFailedException
The exception that is thrown when a test fails.
public class TestFailedException : WorkflowException, ISerializable
- Inheritance
-
TestFailedException
- Implements
- Inherited Members
Constructors
TestFailedException()
Initializes a new instance of the TestFailedException class.
public TestFailedException()
TestFailedException(string?)
Initializes a new instance of the TestFailedException class with a specified error message.
public TestFailedException(string? message)
Parameters
messagestringThe message that describes the error.
TestFailedException(string?, Exception?)
Initializes a new instance of the TestFailedException class with a specified error message and a reference to the inner exception that is the cause of this exception.
public TestFailedException(string? message, Exception? inner)
Parameters
messagestringThe message that describes the error.
innerExceptionThe exception that is the cause of the current exception, or null if no inner exception is specified.
TestFailedException(string?, string?)
Initializes a new instance of the TestFailedException class with a specified error message and test fail reason.
public TestFailedException(string? message, string? reason)
Parameters
TestFailedException(string?, string?, Exception?)
Initializes a new instance of the TestFailedException class with a specified error message, test fail reason, and a reference to the inner exception that is the cause of this exception.
public TestFailedException(string? message, string? reason, Exception? inner)
Parameters
messagestringThe message that describes the error.
reasonstringThe test failure reason.
innerExceptionThe exception that is the cause of the current exception, or null if no inner exception is specified.
Properties
Reason
Gets the test failure reason.
public string? Reason { get; }
Property Value
Methods
CreateLogged(ITestLog?)
public static TestFailedException CreateLogged(ITestLog? testLog)
Parameters
testLogITestLog
Returns
CreateLogged(ITestLog?, string?, string?)
public static TestFailedException CreateLogged(ITestLog? testLog, string? message, string? reason)
Parameters
Returns
CreateLogged(ITestLog?, string?, string?, Exception?)
public static TestFailedException CreateLogged(ITestLog? testLog, string? message, string? reason, Exception? inner)
Parameters
Returns
CreateLoggedFromReason(ITestLog?, string?)
public static TestFailedException CreateLoggedFromReason(ITestLog? testLog, string? reason)
Parameters
Returns
CreateLoggedFromReason(ITestLog?, string?, Exception?)
public static TestFailedException CreateLoggedFromReason(ITestLog? testLog, string? reason, Exception? inner)
Parameters
Returns
LogIfNotLoggedYet(ITestLog?)
Logs this exception to a test log if it has not yet been logged to any test log via this method.
public TestFailedException LogIfNotLoggedYet(ITestLog? testLog)
Parameters
Returns
- TestFailedException
This instance.