Share via


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

Definition

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

public static void IsGreaterThan<T>(T lowerBound, T value, string message = "") where T : IComparable<T>;
static member IsGreaterThan : 'T * 'T * string -> unit (requires 'T :> IComparable<'T>)
Public Shared Sub IsGreaterThan(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 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 lowerBound. The message is shown in test results.

Exceptions

Thrown if value is not greater than lowerBound.

Applies to