Specification.

NotContains<T, TPropertyType>(Expression<Func<T, IEnumerable<TPropertyType>>>, TPropertyType, IEqualityComparer<TPropertyType>) Method

Summary

Creates ContainsSpecification<T, TType> negation for candidate property:

Checks if candidate property not contains expected element.

Namespace
FluentSpecification
Containing Type
Specification

Syntax

[PublicAPI]
[NotNull]
public static IComplexSpecification<T> NotContains<T, TPropertyType>(Expression<Func<T, IEnumerable<TPropertyType>>> selector, TPropertyType notExpected, IEqualityComparer<TPropertyType> comparer = null)

Attributes

Type Description
PublicAPI
NotNull

Type Parameters

Name Description
T Type of candidate.
TPropertyType Type of expected element in collection.

Parameters

Name Type Description
selector Expression<Func<T, IEnumerable<TPropertyType>>> Candidate property selector.
notExpected TPropertyType Not expected element in collection.
comparer IEqualityComparer<TPropertyType> Equality comparer.

Return Value

Type Description
IComplexSpecification<T> Composed complex Specification.

Exceptions

Type Description
System.ArgumentNullException Thrown when selector is null.
System.ArgumentException Thrown when selector is not valid.
GitHub