Table of Contents

Class TestFailedException

Namespace
Acuit.Pinpoint.Workflows.Testing
Assembly
Acuit.Pinpoint.Workflows.Testing.dll

The exception that is thrown when a test fails.

[Serializable]
public class TestFailedException : WorkflowException, ISerializable, _Exception
Inheritance
TestFailedException
Implements
Inherited Members
Extension Methods

Constructors

TestFailedException()

Initializes a new instance of the TestFailedException class.

public TestFailedException()

TestFailedException(SerializationInfo, StreamingContext)

Initializes a new instance of the TestFailedException class with serialized data.

protected TestFailedException(SerializationInfo info, StreamingContext context)

Parameters

info SerializationInfo

The SerializationInfo that holds the serialized object data about the exception being thrown.

context StreamingContext

The StreamingContext that contains contextual information about the source or destination.

Exceptions

ArgumentNullException

info is null.

SerializationException

The class name is null or HResult is zero (0).

TestFailedException(string)

Initializes a new instance of the TestFailedException class with a specified error message.

public TestFailedException(string message)

Parameters

message string

The 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

message string

The message that describes the error.

inner Exception

The 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

message string

The message that describes the error.

reason string

The test failure reason.

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

message string

The message that describes the error.

reason string

The test failure reason.

inner Exception

The 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

string

Methods

CreateFromReason(string)

[Obsolete("This is deprecated and will be removed in a future version; CreateLoggedFromReason should be used instead.")]
public static TestFailedException CreateFromReason(string reason)

Parameters

reason string

Returns

TestFailedException

CreateFromReason(string, Exception)

[Obsolete("This is deprecated and will be removed in a future version; CreateLoggedFromReason should be used instead.")]
public static TestFailedException CreateFromReason(string reason, Exception inner)

Parameters

reason string
inner Exception

Returns

TestFailedException

CreateLogged(ITestLog)

public static TestFailedException CreateLogged(ITestLog testLog)

Parameters

testLog ITestLog

Returns

TestFailedException

CreateLogged(ITestLog, string, string)

public static TestFailedException CreateLogged(ITestLog testLog, string message, string reason)

Parameters

testLog ITestLog
message string
reason string

Returns

TestFailedException

CreateLogged(ITestLog, string, string, Exception)

public static TestFailedException CreateLogged(ITestLog testLog, string message, string reason, Exception inner)

Parameters

testLog ITestLog
message string
reason string
inner Exception

Returns

TestFailedException

CreateLoggedFromReason(ITestLog, string)

public static TestFailedException CreateLoggedFromReason(ITestLog testLog, string reason)

Parameters

testLog ITestLog
reason string

Returns

TestFailedException

CreateLoggedFromReason(ITestLog, string, Exception)

public static TestFailedException CreateLoggedFromReason(ITestLog testLog, string reason, Exception inner)

Parameters

testLog ITestLog
reason string
inner Exception

Returns

TestFailedException

GetObjectData(SerializationInfo, StreamingContext)

When overridden in a derived class, sets the SerializationInfo with information about the exception.

public override void GetObjectData(SerializationInfo info, StreamingContext context)

Parameters

info SerializationInfo

The SerializationInfo that holds the serialized object data about the exception being thrown.

context StreamingContext

The StreamingContext that contains contextual information about the source or destination.

Exceptions

ArgumentNullException

The info parameter is a null reference (Nothing in Visual Basic).

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

testLog ITestLog

The test log, or null to do nothing.

Returns

TestFailedException

This instance.