Specification.

IsType<T>(ICompositeSpecification<T>, Type) Method

Summary

Composes self Specification with IsTypeSpecification<T>:

Checks if candidate is compatible with a given type.

Namespace
FluentSpecification
Containing Type
Specification

Syntax

[PublicAPI]
[NotNull]
public static IComplexSpecification<T> IsType<T>(this ICompositeSpecification<T> self, Type expected)

Attributes

Type Description
PublicAPI
NotNull

Type Parameters

Name Description
T Type of candidate property to verification.

Parameters

Name Type Description
self ICompositeSpecification<T> Self specification.
expected Type Expected type of candidate property.

Return Value

Type Description
IComplexSpecification<T> Composed complex Specification.

Exceptions

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