Automating The Arrange Phase With AutoFixture
In a previous article, we refactored a unit test in two ways. The builder and fixture patterns encapsulated an object’s creation, which simplified the arrange phase of a unit test. These two patterns produced a lot of boiler-plate code. It would be nice to never have to create an arrange phase in the first place. AutoFixture tries to produce unit tests with no arrange phase. As the AutoFixture GitHub page describes:...