Quick glance at AutoFixture
AutoFixture is a library focused on test data generation so that unit tests can focus on the behavior to be tested rather than on the plumbing needed to get the test to run.
Note: at the time of writing, the latest version of AutoFixture is the 4.13.
This is the simplest usage of AutoFixture
public void Echo_should_return_incoming_message()
var fixture = new Fixture();
var sut = fixture.Create<EchoService>();
var message = fixture.Create<string>();
var result = sut.Echo(message);
In the snippet above, 1. we create an instance of
Fixture2. we use the fixture to create an instance of the system under test, the service EchoService 3. we use the fixture to create a sample message 4. we exert the system under test by passing the sample message 5. we assert that the output is equal to the input