Assert.IsLessThan<T>(T, T, String) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Tests whether the value is less than the upper bound and throws an exception if it is not.
public static void IsLessThan<T>(T upperBound, T value, string message = "") where T : IComparable<T>;
static member IsLessThan : 'T * 'T * string -> unit (requires 'T :> IComparable<'T>)
Public Shared Sub IsLessThan(Of T As IComparable(Of T)) (upperBound As T, value As T, Optional message As String = "")
Type Parameters
- T
The type of values to compare.
Parameters
- upperBound
- T
The upper bound value that the value should be less than.
- 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 less than upperBound
. The message is shown in
test results.
Exceptions
Thrown if value
is not less than upperBound
.