This project is read-only.


AutoFixture is built around a very extensible kernel. This kernel can be composed from a wide variety of components to provide object creation services, but the default specialization is implemented in the Fixture class, which is the class you are expected to use to create Anonymous Variables:

Fixture fixture = new Fixture();
var anonymousText = fixture.CreateAnonymous<string>();
The Fixture class is defined in the Ploeh.AutoFixture namespace, and unless you explicitly need to extend the kernel, you should only need to import this namespace. The kernel, on the other hand, is implemented in the Ploeh.AutoFixture.Kernel namespace. The Fixture class implements the appropriate kernel interface that enables it to create Anonymous Variables (also called specimens).

Creating Objects

The Object Creation Architecture page describes how the kernel creates specimens when you invoke the CreateAnonymous<T> or CreateMany<T> methods. It also describes some important interfaces that also serve as major extensibility points for the kernel.

Fixture Structure

The Fixture class is a specialization that composes the components of the kernel in a very specific way to implement the features and behavior of AutoFixture. The Fixture Architecture page describes the high-level structure of the Fixture class.

Last edited Oct 13, 2010 at 2:01 PM by ploeh, version 12


No comments yet.