Interface ISpecimenBuilder
Builds, or partakes in building, anonymous variables (specimens).
Namespace: AutoFixture.Kernel
Assembly: AutoFixture.dll
Syntax
public interface ISpecimenBuilder
Methods
| Improve this Doc View SourceCreate(Object, ISpecimenContext)
Creates a new specimen based on a request.
Declaration
object Create(object request, ISpecimenContext context)
Parameters
Type | Name | Description |
---|---|---|
System.Object | request | The request that describes what to create. |
ISpecimenContext | context | A context that can be used to create other specimens. |
Returns
Type | Description |
---|---|
System.Object | The requested specimen if possible; otherwise a NoSpecimen instance. |
Remarks
The request
can be any object, but will often be a
System.Type or other System.Reflection.MemberInfo instances.
Note to implementers: Implementations are expected to return a NoSpecimen instance if they can't satisfy the request.