Specification.

LessThan<T>(ICompositeSpecification<T>, T, IComparer<T>) Method

Summary

Composes self Specification with LessThanSpecification<T>:

Checks if candidate object is lower than expected value.

Namespace
FluentSpecification
Containing Type
Specification

Syntax

[PublicAPI]
[NotNull]
public static IComplexSpecification<T> LessThan<T>(this ICompositeSpecification<T> self, T lessThan, IComparer<T> comparer = null)

Attributes

Type Description
PublicAPI
NotNull

Type Parameters

Name Description
T Type of compared objects.

Parameters

Name Type Description
self ICompositeSpecification<T> Self specification.
lessThan T Candidate should be less than value.
comparer IComparer<T> Comparer.

Return Value

Type Description
IComplexSpecification<T> Composed complex Specification.

Exceptions

Type Description
System.ArgumentNullException Thrown when self is null.
System.ArgumentException Thrown when T has no valid comparison methods.
GitHub