Class RangeAsserts
- Namespace
- Asserts
- Assembly
- xunit.v3.assert.dll
public class RangeAsserts
- Inheritance
-
RangeAsserts
- Inherited Members
Methods
InRange<T>(T, T, T)
Verifies that a value is within a given range.
public static void InRange<T>(T actual, T low, T high) where T : IComparable
Parameters
actualTThe actual value to be evaluated
lowTThe (inclusive) low value of the range
highTThe (inclusive) high value of the range
Type Parameters
TThe type of the value to be compared
Examples
Add an example for this method ?
Contribution guide.
Exceptions
- InRangeException
Thrown when the value is not in the given range
InRange<T>(T, T, T, IComparer<T>)
Verifies that a value is within a given range, using a comparer.
public static void InRange<T>(T actual, T low, T high, IComparer<T> comparer)
Parameters
actualTThe actual value to be evaluated
lowTThe (inclusive) low value of the range
highTThe (inclusive) high value of the range
comparerIComparer<T>The comparer used to evaluate the value's range
Type Parameters
TThe type of the value to be compared
Examples
Add an example for this method ?
Contribution guide.
Exceptions
- InRangeException
Thrown when the value is not in the given range
NotInRange<T>(T, T, T)
Verifies that a value is not within a given range, using the default comparer.
public static void NotInRange<T>(T actual, T low, T high) where T : IComparable
Parameters
actualTThe actual value to be evaluated
lowTThe (inclusive) low value of the range
highTThe (inclusive) high value of the range
Type Parameters
TThe type of the value to be compared
Examples
Add an example for this method ?
Contribution guide.
Exceptions
- NotInRangeException
Thrown when the value is in the given range
NotInRange<T>(T, T, T, IComparer<T>)
Verifies that a value is not within a given range, using a comparer.
public static void NotInRange<T>(T actual, T low, T high, IComparer<T> comparer)
Parameters
actualTThe actual value to be evaluated
lowTThe (inclusive) low value of the range
highTThe (inclusive) high value of the range
comparerIComparer<T>The comparer used to evaluate the value's range
Type Parameters
TThe type of the value to be compared
Examples
Add an example for this method ?
Contribution guide.
Exceptions
- NotInRangeException
Thrown when the value is in the given range