Customize<T>
method of IFixture
.Build<T>
. In this case, the customization is totally replaced.Register
Register
extension method can be used as replacement for a customization composed by a call to FromFactory
followed by OmitAutoProperties
.Register
can be used to handle custom interfaces since they are not natively supported by AutoFixture.Inject
Inject
extension method can be used as a replacement for a call to Register
that uses an instance already existing.Register
, Inject
can accept a subtype of the type being configured.Inject
is the best way to force a value to an Enum
.Freeze
Freeze
method creates an anonymous variable, injects it and returns it to the caller.Freeze
returns the frozen instance. We will see how this will be useful when integrating AutoFixture with NUnit.