PexAssert.ReachEventually Method

Definition

Overloads

ReachEventually()

Specifies that the default location in the program should be reached eventually.

ReachEventually(Int32)

Specifies a location in the program that should be reached eventually.

ReachEventually(String)

Specifies a location in the program that should be reached eventually.

ReachEventually()

Specifies that the default location in the program should be reached eventually.

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

Remarks

Must be used in combination with PexAssertReachEventuallyAttribute.

Applies to

ReachEventually(Int32)

Specifies a location in the program that should be reached eventually.

public:
 static void ReachEventually(int location);
public static void ReachEventually (int location);
static member ReachEventually : int -> unit
Public Shared Sub ReachEventually (location As Integer)

Parameters

location
Int32

An integer that identifies a particular ReachEventually instance.

Remarks

This method identifies a particular goal in the code, and is typically used to identify multiple code branches that should be reached by tests. To use ReachEventually, annotate the method that contains the code branches with PexAssertReachEventuallyAttribute set to the number of goals. Call ReachEventually in each of the branches, with location set to one of the goal numbers. The goals are numbered in sequence, starting with 0.

Applies to

ReachEventually(String)

Specifies a location in the program that should be reached eventually.

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

Parameters

location
String

A string that identifies a particular ReachEventually instance.

Remarks

This method identifies a particular goal in the code, and is typically used to identify multiple code branches that should be reached by tests. To use ReachEventually, annotate the method that contains the code branches with PexAssertReachEventuallyAttribute, and define the location string in the attribute. Then call ReachEventually in each of the branches, with location set to one of the attribute's location strings.

Applies to