|
Project Information
Members
Featured
Downloads
Wiki pages
|
NBuilderPlease see the official website: http://nbuilder.org Update 14 August 2011: Version 3.0 ReleaseSome bug fixes and patches, courtesy of Joshua Roth. Also revised the syntax. Now building lists and building single objects share the same method names. For example, where it used to be: Builder<Product>.CreateNew().With(x => x.Title = "some title").Build(); Builder<Product>.CreateListOfSize(10).WhereAll().Have(x => x.Title = "some title").Build(); Now the syntax for building a list is: Builder<Product>.CreateListOfSize(10).All().With(x => x.Title = "some title").Build(); The old syntax methods are still there but have been marked [Obsolete]. Please note though that a build is included where these methods are not obsolete. This is for cases where people don't want compiler warnings about using [Obsolete] methods. The recommended approach though is to find-and-replace and convert the old syntax to the new. The changes are as follows: WhereAll() -> All() WhereTheFirst() -> TheFirst() WhereTheLast() -> TheLast() WhereSection() -> Section() WhereRandom() -> Random() AndTheNext() -> TheNext() AndThePrevious() -> ThePrevious() AndTheLast() -> TheLast() Have() -> With() Has() -> With() I'll be posting up a script in the next few days to find and replace all method calls within a codebase. Update 29 August 2010: Version 2.2.0 ReleaseThis adds support for silverlight. Both the 3.5 CLR and a Silverlight 3 version are included in the zip file. Also includes some other very minor bug fixes. Update 20 October 2009: Version 2.1.9 beta DLL availableSince there are a few patches and new features all at once, I thought it would be best to issue a beta release. Please report any issues.
Builder<Product>.CreateNew()
.WithConstructor( () => new Product("title", 5.5m) )
.Build()
Update 12 June 2009: Version 2.1.8 DLL and source code now availableUpdate 6 June 2009: Version 2.1.7 DLL and source code now available
Update 30 May 2009: Version 2.1.6 DLL and source code now available
Thanks to Kevin Kuebler for finding the defects, fixing both of them and implementing enum support! To see it in action please see the Overview/HowTo page
|