Quick glance at AutoFixture
Last updated
Was this helpful?
Last updated
Was this helpful?
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.
There is an exhaustive cheat sheet available for quick reference.
Note: at the time of writing, the latest version of AutoFixture is the 4.13.
This is the simplest usage of AutoFixture
In the snippet above, 1. we create an instance of Fixture
2. 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