Namespace AutoFixture.Kernel

Classes

AbstractTypeSpecification

A specification that evaluates whether a request is a request for an abstract type such as an abstract base class or an interface.

ActionSpecimenCommand<T>

Adapts an action delegate to ISpecimenCommand.

AndPropertyQuery

A query which is used to compose multiple IPropertyQuerys, returning only those properties that are returned by all queries.

AndRequestSpecification

A boolean 'And' Composite IRequestSpecification.

AnyTypeSpecification

A specification that evaluates whether a request is a request for a type.

ArrayFavoringConstructorQuery

Selects public constructors ordered so that any constructor with array arguments are selected before any other public constructor.

ArrayRelay

Relays a request for an array to a MultipleRequest and converts the result to the desired array type.

AutoPropertiesCommand

A command that assigns anonymous values to all writable properties and fields of a type.

AutoPropertiesCommand<T>

A command that assigns anonymous values to all writable properties and fields of a type.

BindingCommand<T, TProperty>

Encapsulates a command that binds a property or a field to a value.

CollectionRelay

Relays a request for an ICollection%601 to a request for a List%601 and returns the result.

CollectionSpecification

Encapsulates logic that determines whether a request is a request for a Collection%601.

CompositeMethodQuery

An implementation of IMethodQuery that composes other IMethodQuery instances.

CompositeSpecimenBuilder

Creates specimens by returning the first specimen created by its children.

CompositeSpecimenCommand

Aggregates a set of ISpecimenCommand. Executing the aggregate will trigger the execution of the parts.

ConstrainedStringRequest

Encapsulates a maximum length for a string.

ConstructorMethod

Encapsulates a constructor as a method.

Criterion<T>

Serves as a criterion against which a value can be compared. When a given value equals the criterion, it can be said to match the criterion; otherwise not.

DelegateGenerator

Creates new Delegate instances.

DelegateSpecification

A specification that evaluates specimen request to see if it's for the delegate type.

DictionaryRelay

Relays a request for an IDictionary%602 to a request for a Dictionary%602 and returns the result.

DictionarySpecification

Encapsulates logic that determines whether a request is a request for a dictionary.

DirectBaseTypeSpecification

A specification that determines whether the request is a request for a Type that directly inherits from the specified Type.

DisposableTracker

Tracks all disposable specimens created by a decorated ISpecimenBuilder to be able to dispose them when signalled.

DisposableTrackingBehavior

Decorates ISpecimenBuilder instances with DisposableTracker instances.

EnumerableFavoringConstructorQuery

Selects public constructors ordered so that any constructor with arguments matching IEnumerable%601 are selected before any other public constructor.

EnumerableRelay

Relays a request for IEnumerable%601 to a MultipleRequest and converts the result to a sequence of the requested type.

EnumeratorRelay

Relays a request for IEnumerator%601 to IEnumerable%601 and converts the result to an enumerator of a sequence of the requested type.

EqualRequestSpecification

Evaluates whether a request is equal to an expected target.

ExactTypeSpecification

A specification that evaluates requests for types against a target type. Also matches generic type requests agains the specified open generic.

FactoryMethodQuery

Selects public factory methods ordered by the modest first.

FalseRequestSpecification

A IRequestSpecification that is always false.

FieldRequestRelay

Relays a request for a field to a SeededRequest with a seed based on the field's name.

FieldSpecification

A specification that determines whether the request is a request for a FieldInfo matching the specified name and Type.

FieldTypeAndNameCriterion

Represents a criterion for comparing a candidate field against a desired type and name.

FilteringSpecimenBuilder

Decorates an ISpecimenBuilder and filters requests so that only some requests are passed through to the decorated builder.

FiniteSequenceRelay

Unwraps a request for many instances and returns the results as a true dynamic sequence.

FiniteSequenceRequest

Signals that many similar instances are requested.

FixedBuilder

A ISpecimenBuilder that always returns the same specimen.

GenericCollectionPropertyQuery

A query which returns generic collection properties from specified types.

GenericMethod

Encapsulates a generic method, inferring the type parameters bases on invocation arguments.

GreedyConstructorQuery

Selects public constructors ordered by the most greedy constructor first.

HashSetSpecification

Encapsulates logic that determines whether a request is a request for a HashSet%601.

IllegalRequestException

Indicates that an illegal request was detected.

ImplementedInterfaceSpecification

A specification that determines whether the request is a request for a Type that implements the specified interface Type.

InstanceMethod

Encapsulates an instance method. This is essentially an Adapter over MethodInfo.

InstanceMethodQuery

Selects a method from an instance.

IntPtrGuard

Guards against requests for IntPtr by throwing an exception.

InverseRequestSpecification

Decorates an IRequestSpecification and returns the opposite result.

ListFavoringConstructorQuery

Selects public constructors ordered so that any constructor with arguments matching IList%601 are selected before any other public constructor.

ListRelay

Relays a request for an IList%601 to a request for a List%601 and returns the result.

ListSpecification

Encapsulates logic that determines whether a request is a request for a List%601.

MemberInfoEqualityComparer

Provides custom equality comparison for MemberInfo instances.

MethodInvoker

Creates a new instance of the requested type by invoking the first method it can satisfy.

MissingParametersSupplyingMethod

Decorates another method invoking it supplying missing parameters.

MissingParametersSupplyingMethodFactory

Creates a new MissingParametersSupplyingMethod for an instance MethodInfo.

MissingParametersSupplyingStaticMethodFactory

Creates a new MissingParametersSupplyingMethod for a static MethodInfo.

ModestConstructorQuery

Selects public constructors ordered by the most modest constructor first.

MultidimensionalArrayRelay

Relays a request for a multidimensional array to a jagged array and converts the result to the desired multidimensional array type.

MultipleRelay

Relays requests for multiple (an unspecified count) specimens to a request for a specific number of specimens.

MultipleRequest

Represents a request for many (an unspecified number) of specimens.

MultipleToEnumerableRelay

Relays a MultipleRequest to a request for IEnumerable%601.

MutableValueTypeWarningThrower

Throws an ObjectCreationException when one tries to create Structure without explicit parametrized constructor. Possibly notifying about bad design (mutable value type).

NoConstructorsSpecification

A specification that evaluates whether a request is a request for a type without public constructors.

NoSpecimen

Signifies that it's not a specimen.

NoSpecimenOutputGuard

Prevents a decorated ISpecimenBuilder from returning a NoSpecimen instance.

NullRecursionGuard

Recursion handler that returns null at recursion points.

NullRecursionHandler

Breaks a recursion by returning null.

NullableEnumRequestSpecification

A specification that evaluates whether a request is a request for a nullable enum.

ObservableCollectionSpecification

Encapsulates logic that determines whether a request is a request for a ObservableCollection%601.

OmitArrayParameterRequestRelay

Relays requests for array parameters, and returns an empty array if the object returned from the context is an OmitSpecimen instance.

OmitEnumerableParameterRequestRelay

Relays requests for enumerable parameters, and returns an empty array if the object returned from the context is an OmitSpecimen instance.

OmitFixtureSpecification

A specification which omits the Fixture and IFixture types.

OmitOnRecursionGuard

Recursion handler that returns OmitSpecimen at recursion points.

OmitOnRecursionHandler

Breaks a recursion by instructing AutoFixture to ignore the current request.

OmitSpecimen

A signal type used to indicate to the Auto-Property feature that a given request should be ignored, and no further processing performed.

Omitter

Issues OmitSpecimen instances if its encapsulated IRequestSpecification is satisfied.

OrRequestSpecification

A boolean 'Or' Composite IRequestSpecification.

ParameterRequestRelay

Relays a request for a parameter to a SeededRequest with a seed based on the parameter's name.

ParameterSpecification

A specification that determines whether the request is a request for a ParameterInfo matching the specified name and Type.

ParameterTypeAndNameCriterion

Represents a criterion for comparing a candidate parameter against a desired type and name.

Postprocessor

Performs post-processing on a created specimen.

Postprocessor<T>

Performs post-processing on a created specimen.

PropertyRequestRelay

Relays a request for a property to a SeededRequest with a seed based on the property's name.

PropertySpecification

A specification that determines whether the request is a request for a PropertyInfo matching a particular property, according to the supplied comparison rules.

PropertyTypeAndNameCriterion

Represents a criterion for comparing a candidate property against a desired type and name.

RangedNumberRequest

Encapsulates a range for values of a given type.

RangedSequenceRelay

Relay the RangedSequenceRelay to the request for the sequence of the fixed length.

RangedSequenceRequest

Request for the sequence of Request values. Sequece size is constrained by the MinLength and MaxLength values.

ReadOnlyCollectionRelay

Relays a request for an IReadOnlyCollection%601 to a request for a List%601 and retuns the result.

ReadonlyCollectionPropertiesCommand

A command which invokes Add(%600) to fill all readonly properties in a specimen that implement ICollection%601.

ReadonlyCollectionPropertiesSpecification

A specification that evaluates whether or not a request is for a type containing readonly properties that implement ICollection%601.

ReadonlyPropertyQuery

A query which returns readonly properties from specified types.

RecursionGuard

Base class for recursion handling. Tracks requests and reacts when a recursion point in the specimen creation process is detected.

RegularExpressionRequest

Encapsulates a pattern for a regular expression.

RequestTraceEventArgs

Event args about a request for a specimen.

SeedIgnoringRelay

Unwraps a request for a SeededRequest to a request for its Request while ignoring the Seed.

SeedRequestSpecification

A specification that evaluates seeded requests for types against a target type.

SeededFactory<T>

Creates a new specimen from a SeededRequest using a function.

SeededRequest

Encapsulates a seed for a given type.

SortedDictionarySpecification

Encapsulates logic that determines whether a request is a request for a SortedDictionary%602.

SortedListSpecification

Encapsulates logic that determines whether a request is a request for a SortedList%602.

SortedSetSpecification

Encapsulates logic that determines whether a request is a request for a SortedSet%601.

SpecifiedNullCommand<T, TProperty>

A no-op that identifies a certain property or field.

SpecimenBuilderNode

Contains extension methods for working with ISpecimenBuilderNode instances.

SpecimenBuilderNodeFactory

Exposes convenience methods for producing well-known object graphs.

SpecimenContext

Default implementation of ISpecimenContext.

SpecimenCreatedEventArgs

Event arguments about a created specimen.

SpecimenFactory<TInput, T>

Creates a new specimen using a Func%602.

SpecimenFactory<TInput1, TInput2, T>

Creates a new specimen using a Func%603.

SpecimenFactory<TInput1, TInput2, TInput3, T>

Creates a new specimen using a Func%604.

SpecimenFactory<TInput1, TInput2, TInput3, TInput4, T>

Creates a new specimen using a Func%605.

SpecimenFactory<T>

Creates a new specimen using a Func%601.

StableFiniteSequenceRelay

Unwraps a request for many instances and returns the results as a stable list.

StaticMethod

Encapsulates a static method.

TemplateMethodQuery

Selects public static methods that has the same parameters of another method, ignoring optional parameters and return type.

TerminatingSpecimenBuilder

Throws an ObjectCreationException.

TerminatingWithPathSpecimenBuilder

Decorates an ISpecimenBuilder with a node which tracks specimen requests, and when NoSpecimen is detected or creation fails with exception, throws an ObjectCreationException, which includes a description of the request path.

ThrowingRecursionGuard

Handles recursion in the specimen creation process by throwing an exception at recursion point.

ThrowingRecursionHandler

Breaks a recursion by throwing a descriptive exception.

TraceWriter

Trace writer that will write out a trace of object requests and created objects in the ISpecimenBuilder pipeline.

TracingBuilder

Tracks any request and passes it on to the container. Tracks any returned object from the container and passes it on.

TrueRequestSpecification

A IRequestSpecification that is always true.

TypeArgumentsCannotBeInferredException

The exception that is thrown when AutoFixture is unable to infer the type parameters of a generic method from its arguments.

TypeRelay

Maps a request for one Type to a request for another Type.

UnspecifiedSpecimenCommand<T>

Encapsulates an operation without identifying any property or field.

ValueTypeSpecification

A specification that evaluates whether a request is a request for a value type such as a structure.

Interfaces

IMethod

Represents some kind of method that can be invoked with a known set of parameters.

IMethodFactory

Creates a new Method from a MethodInfo.

IMethodQuery

Defines a strategy for selecting methods (such as constructors or factory methods) from a type.

IPropertyQuery

Defines a strategy for selecting properties from a type.

IRecursionHandler

Handles a recursive request.

IRequestSpecification

A Specification that evaluates requests.

ISpecifiedSpecimenCommand<T>

A Command that performs an action on a specimen and knows whether that action matches a given request.

ISpecimenBuilder

Builds, or partakes in building, anonymous variables (specimens).

ISpecimenBuilderNode

A node in a graph of ISpecimenBuilder instances.

ISpecimenBuilderTransformation

Transforms ISpecimenBuilder instance into ISpecimenBuilderNode.

ISpecimenCommand

Represents a command which can be applied to a specimen.

ISpecimenContext

A context used to create anonymous variables (specimens).