Createmethod is responsible for initiating the construction of the requested type. When invoked, AutoFixture will use all current customizations and default configurations.
Buildis used to initiate the fluent Customization API. This API is composed by many methods.
OmitAutoPropertiesdisables the assignment of values to properties.
WithAutoPropertiesforces the assignment of values to properties, even if it had been disabled on the fixture
Withconstruct allows the customization of writeable properties and public fields.
OmitAutoProperties()or by setting the
OmitAutoPropertiesproperty of the fixture to
IFixture. If so, the same instance will be passed.
Withoutconstruct can be used to disable the generation of the value for a specific property without affecting other properties.
With(null): the first skips the selected properties (leaving the default value) whilst the second assigns it a
FromFactoryconstruct to instruct AutoFixture.
FromFactoryallows the developer to specify a function delegate that will be used to generate the object. There are overloads who accept from 0 to 4 arguments. AutoFixture will provide a value for each requested argument.
FromFactoryhas an overload accepting an
ISpecimenBuilderfor more advanced scenarios.
Doconstruct to instruct AutoFixture to do so.