Partilhar via


Assert.Fail Method

Definition

Overloads

Fail()

Throws an AssertFailedException.

Fail(String)

Throws an AssertFailedException.

Fail(String, Object[])

Throws an AssertFailedException.

Fail()

Throws an AssertFailedException.

public:
 static void Fail();
public static void Fail ();
static member Fail : unit -> unit
Public Shared Sub Fail ()

Exceptions

Always thrown.

Applies to

Fail(String)

Throws an AssertFailedException.

public:
 static void Fail(System::String ^ message);
public static void Fail (string message);
static member Fail : string -> unit
Public Shared Sub Fail (message As String)

Parameters

message
String

The message to include in the exception. The message is shown in test results.

Exceptions

Always thrown.

Applies to

Fail(String, Object[])

Throws an AssertFailedException.

public:
 static void Fail(System::String ^ message, ... cli::array <System::Object ^> ^ parameters);
public static void Fail (string message, params object[] parameters);
static member Fail : string * obj[] -> unit
Public Shared Sub Fail (message As String, ParamArray parameters As Object())

Parameters

message
String

The message to include in the exception. The message is shown in test results.

parameters
Object[]

An array of parameters to use when formatting message.

Exceptions

Always thrown.

Applies to