Better .NET Unit Tests with AutoFixture: Get Started
Create shorter, less cluttered, more readable, and refactor-safe test code.
What you'll learn
The open source AutoFixture library helps reduce the amount of unnecessary code in the arrange phases of test code. It does this by automatically supplying values for test data that are required for the test to function, but where the exact value is unimportant. In addition to simple types, AutoFixture also creates object graphs of test data, reducing the amount of test code that needs to be written and reducing the chances that tests will break compilation when changes are made to production code.
Table of contents
- Introduction 1m
- Creating Anonymous Strings 6m
- Creating Anonymous Numbers 4m
- Creating Anonymous Dates and Times 4m
- Creating Anonymous Value Sequences 7m
- Creating Custom Objects 7m
- Creating Complex Object Graphs 4m
- Creating Objects with DataAnnotations 2m
- Creating Sequences of Custom Objects 3m
- Summary 2m