AutoFixture 2.0 beta 1 by Mark Seemann
It gives me great pleasure to announce that AutoFixture 2.0 beta 1 is now available for download. Compared to version 1.1 AutoFixture 2.0 is implemented using a new and much more open and extensible engine that enables many interesting scenarios.
Despite the new engine and the vastly increased potential, the focus on version 2.0 has been to ensure that the current, known feature set was preserved.
While AutoFixture 2.0 introduces new features, this release is first and foremost an upgrade to a completely new internal architecture, so the number of new releases is limited. Never the less, the following new features are available in version 2.0:
- Support for enums
- Full support of arrays
- Optional tracing
- Improved extensibility
- Optional auto-mocking with Moq (implemented as a separate, optional assembly)
- Optional extensions for xUnit.net (implemented as a separate, optional assembly)
There are still open feature requests for AutoFixture, so now that the new engine is in place I can again focus on implementing some of the features that were too difficult to address with the old engine.
Version 2.0 introduces some breaking changes, although the fundamental API remains recognizable.
- A lot of the original methods on Fixture are now extension methods on IFixture (a new interface). The methods include CreateAnonymous<T>, CreateMany<T> and many others, so you will need to include a using directive for Ploeh.AutoFixture to compile the unit test code.
- CreateMany<T> still returns IEnumerable<T>, but the return value is much more consistently deferred. This means that in almost all cases you should instantly stabilize the sequence by converting it to a List<T>, an array or similar.
- Several methods are now deprecated in favor of new methods with better names.
A few methods were also removed, but only those that were already deprecated in version 1.1.
The general availability of beta 1 of AutoFixture 2.0 marks the beginning of a trial period. If no new issues are reported within the next few weeks, a final version 2.0 will be released. If too many issues are reported, a new beta version may be necessary.
Please report any issues you find.
After the release of the final version 2.0 my plan is currently to focus on the Idioms project, although there are many other new features that might warrant my attention.
Blog posts about the new features will also follow soon.