Specification.

NotContains<T, TType>(ICompositeSpecification<T>, TType, IEqualityComparer<TType>) Method

Summary

Composes self Specification with ContainsSpecification<T, TType> negation:

Checks if candidate not contains expected element.

Namespace
FluentSpecification
Containing Type
Specification

Syntax

[PublicAPI]
[NotNull]
public static IComplexSpecification<T> NotContains<T, TType>(this ICompositeSpecification<T> self, TType notExpected, IEqualityComparer<TType> comparer = null) 
    where T : IEnumerable<TType>

Attributes

Type Description
PublicAPI
NotNull

Type Parameters

Name Description
T Type of candidate (collection)
TType Type of expected element in collection.

Parameters

Name Type Description
self ICompositeSpecification<T> Self specification.
notExpected TType Not expected element in collection.
comparer IEqualityComparer<TType> Equality comparer.

Return Value

Type Description
IComplexSpecification<T> Composed complex Specification.

Exceptions

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