FactoryPlus is a library for creating objects used in testing in .NET programs. It serves as an implementation of the Object Mother pattern.
FactoryPlus is inspired by factory_girl, but aims for simplicity with a small subset of useful features.
Define how to create an object
Factory.Define(() => new User() { Name = "Test" });
Create an object
User user = Factory.Get<User>();
Create many objects
IList<User> users = Factory.GetMany<User>(100);
Named instances
Factory.Define("adminUser", () => new User() { Name = "Test", Role = Roles.Admin });
User user = Factory.Get<User>("adminUser");
FactoryPlus is licensed under the MIT License.