Skip to content

What is the difference between ISpecimenBuilder and ICustomization #1449

Answered by aivascu
alban-ameti asked this question in Q&A
Discussion options

You must be logged in to vote

@alban-ameti the interfaces have very different meaning in AutoFixture. To better understand what they're doing, you need to first understand the way the Fixture object works. You can read the wiki article, about the internal architecture.

In short, when creating an object of a certain type, the fixture will break it down into its composing pieces (members/dependencies). Each piece will run through the pipeline as a distinct request. The process will run recursively until the initial request is broken down into requests for primitive values, that the fixture knows how to instantiate. The instantiation of these primitive request, is usually delegated to objects implementing ISpecimenBuilder.…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@alban-ameti
Comment options

Answer selected by alban-ameti
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants