Specification.

LengthBetween<T>(ICompositeSpecification<T>, int, int) Method

Summary

Composes self Specification with LengthBetweenSpecification<T>:

Checks if length of candidate is between Min and Max values.

Namespace
FluentSpecification
Containing Type
Specification

Syntax

[PublicAPI]
[NotNull]
public static IComplexSpecification<T> LengthBetween<T>(this ICompositeSpecification<T> self, int minLength, int maxLength) 
    where T : IEnumerable

Attributes

Type Description
PublicAPI
NotNull

Type Parameters

Name Description
T Type of candidate to verify (collection or string).

Parameters

Name Type Description
self ICompositeSpecification<T> Self specification.
minLength int Minimum candidate length.
maxLength int Maximum candidate length.

Return Value

Type Description
IComplexSpecification<T> Composed complex Specification.

Exceptions

Type Description
System.ArgumentNullException Thrown when self is null.
GitHub