Share via


Assert.IsGreaterThanOrEqualTo<T>(T, T, String) Method

Definition

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