Last active
August 29, 2015 14:23
-
-
Save kmorcinek/46e02fbd2e29bfaf5bc5 to your computer and use it in GitHub Desktop.
Autofixture stuff
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
http://stackoverflow.com/questions/10032535/can-autofixture-execute-a-delegate-at-object-creation-time?rq=1 : | |
fixture.Customize<MyClass>(c => c.Without(x => x.SomeWeirdText)); | |
public static ObjectBuilder<User> BuildUser(this Fixture f) | |
{ | |
return f.Build<User>().With(u => u.IsDeleted, false); // Probably you do not want code like this, explanation in above link. | |
} | |
http://megakemp.com/2013/04/16/general-purpose-customizations-with-autofixture/ : | |
CookbookAutoDataAttribute | |
Use: | |
[Test] | |
[AutoData] | |
instead of: | |
[Test, AutoData] | |
When more attributes will come (i.e. from CodeAnalysis SupressMessages) they will use current convention and first one is clearer. | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment