SimplyTestData

It's a very subtle test data factory with flexible capabilities to customize created objects. Permanent customizations per type can be defined in order to be always applied on-the-fly to objects being created. At the same time any number of additional ad-hoc customizations can be applied in particular test case. Generally the syntax is extremely simple. Since every customization is an Action<T> where T is the type of created object. This leads to the very clean and expressive test code. Note that this micro-framework is NOT opposed to data generation libraries or frameworks such as NBuilder or AutoPoco but can nicely complement them in most of the cases. For quick introduction you may want to refer to Getting Started wiki page at GitHub (follow Project Site link).


Keywords
test-data, test-factory, TDD, unit-testing, testing, custom, customization, flexible, c-sharp, declarative, domain-driven-design, test-data-generator, testdata
License
MIT
Install
Install-Package SimplyTestData -Version 0.5.1.1

Documentation

Simple

It is a single file with about one hundred lines. Just copy/paste it locally and include into your test project.

Flexible

Set up permanent customizations per type to be always applied on-the-fly to objects being created. Define and apply additional ad-hoc customizations specific to particular test case.

Agnostic

Works with any existing unit-testing frameworks as well as data generation libraries.


"OK. Show me the code."

For quick introduction you may want to refer to Getting Started wiki page.

Similar projects

Well-known and respected:

Little-known:

Unfamiliar: