Monday, February 29, 2016

Using NBuilder for Unit Tests

When you are typically writing Unit Tests for your Visual Studio C# code, you will generally want to generate dummy/test data.  Well, you can hard code many of these values into your Unit Tests or you can use a tool such as NBuilder to do the job of generating all that test data for you!

If you are not familiar with NBuilder, it is available as a NuGet Library (which has not been updated in quite a while: as well as available for download from GitHub:

If you take a look at the GitHub documentation, it may get you started, but may not be sufficient to answer all of your questions.

Fortunately, there is some additional documentation still sitting on the Google Code site that you can use as a secondary reference:

Finally, this article covers some pretty good examples on how to work with NBuilder as well:

No comments:

Post a Comment