-
Notifications
You must be signed in to change notification settings - Fork 20
Open
Description
I know that in the real ruby version, you just call FactoryGirl define method anywhere in a file and that adds the factory and makes it ready to be used.
However, given that in .NET we need to have a class to put code inside, that technique suggests to have a static class with the factory definitions inside a constructor perhaps or have some group of classes that contain inside a group of factory definitions.
Perhaps it could be useful to have a method like FactoryGirl.AddDefinitionsFromNamespace() or FactoryGirl.AddDefinitionsFromAssembly() and a group of methods like that, and define some interface to register factories, like:
public interface IFactoryDefinition<T>{
public Func Define();
}
or something like that. What do you think?
Metadata
Metadata
Assignees
Labels
No labels