Class SpecimenBuilderNodeFactory
Exposes convenience methods for producing well-known object graphs.
Inheritance
System.Object
SpecimenBuilderNodeFactory
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: AutoFixture.Kernel
Assembly: AutoFixture.dll
Syntax
public static class SpecimenBuilderNodeFactory
Methods
| Improve this Doc View SourceCreateComposer<T>()
Creates the appropriate initial graph for a NodeComposer<T>.
Declaration
public static NodeComposer<T> CreateComposer<T>()
Returns
Type | Description |
---|---|
NodeComposer<T> | A new NodeComposer<T> instance with an appropriate initial underlying graph. |
Type Parameters
Name | Description |
---|---|
T | The type of specimen to compose. |
CreateTypedNode(Type, ISpecimenBuilder)
Creates a graph for a typed node.
Declaration
public static FilteringSpecimenBuilder CreateTypedNode(Type targetType, ISpecimenBuilder factory)
Parameters
Type | Name | Description |
---|---|---|
System.Type | targetType | The type of the target specimen that this node can produce. |
ISpecimenBuilder | factory | The factory which actually produces specimen instances. |
Returns
Type | Description |
---|---|
FilteringSpecimenBuilder | 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
.