Interface ISpecimenCommand
Represents a command which can be applied to a specimen.
Namespace: AutoFixture.Kernel
Assembly: AutoFixture.dll
Syntax
public interface ISpecimenCommand
Methods
| Improve this Doc View SourceExecute(Object, ISpecimenContext)
Applies the command to the supplied specimen.
Declaration
void Execute(object specimen, ISpecimenContext context)
Parameters
Type | Name | Description |
---|---|---|
System.Object | specimen | A specimen upon which the command should be applied. |
ISpecimenContext | context | A context that can be used to create other specimens. |
Remarks
Implementations of this interface will often somehow mutate
specimen
, e.g. by assigning values to
properties, alternatively pulling those values from
context
. Another option is that the the
implementation changes the state of command itself. No matter the
details, since this is a Command, it can be expected to mutate
state somewhere.