Class SpecimenBuilderNodeFactory
Namespace: AutoFixture.Kernel
Assembly: AutoFixture.dll
Exposes convenience methods for producing well-known object graphs.
public static class SpecimenBuilderNodeFactoryInheritance
object ← SpecimenBuilderNodeFactory
Inherited Members
object.GetType(), object.MemberwiseClone(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()
Methods
CreateComposer<T>()
Creates the appropriate initial graph for a
NodeComposer%601.
public static NodeComposer<T> CreateComposer<T>()Returns
NodeComposer<T>
A new NodeComposer%601 instance with an appropriate
initial underlying graph.
Type Parameters
T
The type of specimen to compose.
CreateTypedNode(Type, ISpecimenBuilder)
Creates a graph for a typed node.
public static FilteringSpecimenBuilder CreateTypedNode(Type targetType, ISpecimenBuilder factory)Parameters
targetType Type
The type of the target specimen that this node can produce.
factory ISpecimenBuilder
The factory which actually produces specimen instances.
Returns
A new FilteringSpecimenBuilder instance with an
appropriate underlying graph.
Remarks
While the caller must still supply the factory
which produces the specimens, this method wraps that factory in
appropriate filters and relays to ensure that this node handles
and produces only specimens of targetType.