Share via


Assert.IsGreaterThanOrEqualTo Method

Definition

Overloads

IsGreaterThanOrEqualTo<T>(T, T, String)

Tests whether the value is greater than or equal to the lower bound and throws an exception if it is not.

IsGreaterThanOrEqualTo<T>(T, T, String, String, String)

Tests whether the value is greater than or equal to the lower bound and throws an exception if it is not.

IsGreaterThanOrEqualTo<T>(T, T, String)

Source:
Assert.IComparable.cs
Source:
Assert.IComparable.cs

Tests whether the value is greater than or equal to the lower bound and throws an exception if it is not.

public static void IsGreaterThanOrEqualTo<T>(T lowerBound, T value, string message = "") where T : IComparable<T>;
static member IsGreaterThanOrEqualTo : 'T * 'T * string -> unit (requires 'T :> IComparable<'T>)
Public Shared Sub IsGreaterThanOrEqualTo(Of T As IComparable(Of T)) (lowerBound As T, value As T, Optional message As String = "")

Type Parameters

T

The type of values to compare.

Parameters

lowerBound
T

The lower bound value that the value should meet or exceed.

value
T

The value to compare. This is the value produced by the code under test.

message
String

The message to include in the exception when value is not greater than or equal to lowerBound. The message is shown in test results.

Exceptions

Thrown if value is not greater than or equal to lowerBound.

Applies to

IsGreaterThanOrEqualTo<T>(T, T, String, String, String)

Source:
Assert.IComparable.cs

Tests whether the value is greater than or equal to the lower bound and throws an exception if it is not.

public static void IsGreaterThanOrEqualTo<T>(T lowerBound, T value, string? message = "", string lowerBoundExpression = "", string valueExpression = "") where T : IComparable<T>;
static member IsGreaterThanOrEqualTo : 'T * 'T * string * string * string -> unit (requires 'T :> IComparable<'T>)
Public Shared Sub IsGreaterThanOrEqualTo(Of T As IComparable(Of T)) (lowerBound As T, value As T, Optional message As String = "", Optional lowerBoundExpression As String = "", Optional valueExpression As String = "")

Type Parameters

T

The type of values to compare.

Parameters

lowerBound
T

The lower bound value that the value should meet or exceed.

value
T

The value to compare. This is the value produced by the code under test.

message
String

The message to include in the exception when value is not greater than or equal to lowerBound. The message is shown in test results.

lowerBoundExpression
String

The syntactic expression of lowerBound as given by the compiler via caller argument expression. Users shouldn't pass a value for this parameter.

valueExpression
String

The syntactic expression of value as given by the compiler via caller argument expression. Users shouldn't pass a value for this parameter.

Exceptions

Thrown if value is not greater than or equal to lowerBound.

Applies to