Class TerminatingSpecimenBuilder
Throws an ObjectCreationException.
Inheritance
System.Object
TerminatingSpecimenBuilder
Implements
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 class TerminatingSpecimenBuilder : ISpecimenBuilder
Remarks
This ISpecimenBuilder can be used as the last item in a CompositeSpecimenBuilder to throw an exception instead of letting the containing builder return a NoSpecimen instance when it can't satisfy a request.
Methods
| Improve this Doc View SourceCreate(Object, ISpecimenContext)
Throws an ObjectCreationException.
Declaration
public 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. Not used. |
Returns
Type | Description |
---|---|
System.Object | This method never returns. It always throws an ObjectCreationException. |