Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added a static Builder<T> class to emulate NBuilder behaviour #31

Merged
merged 11 commits into from
May 15, 2015
Merged

Added a static Builder<T> class to emulate NBuilder behaviour #31

merged 11 commits into from
May 15, 2015

Conversation

mwhelan
Copy link
Member

@mwhelan mwhelan commented Apr 26, 2015

Made TestDataBuilder.BuildObject virtual rather than abstract and provided default implementation, meaning consumers only have to implement it if they want to construct the object differently.
Had to make a few changes to support weakly typed versions of strongly typed generic functionality.
In particular, added type/object based methods to IAnonymousValueSupplier.

@@ -79,6 +79,7 @@ Prior to v2.0 this library was known as NTestDataBuilder.
}
}

Note that you can optionally override the `BuildObject` method if you want full control over how your object is constructed, for example if you want to use a particular constructor. If you don't provide this then Dossier will create the object for you.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This sentence is a bit confusing given the example preceeding it has the BuildObject method overridden.

Perhaps something like: "Overriding the BuildObject method is optional - if you don't then blagh. It makes sense to override it when blah."

@robdmoore robdmoore mentioned this pull request May 12, 2015
@mwhelan mwhelan merged commit 72280f3 into TestStack:master May 15, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants