The {@link #finds(Class,Strategy)} provides an implementation of a JMock{@link Action} that can simulate searching for an object from a database, and optionally automatically creating a new one if {@link Strategy specified}.
If objects are created, then (mock) services are automatically injected. This is performed by searching for injectXxx() methods. The (mock) {@link DomainObjectContainer container}is also automatically injected, through the setXxx method.
Finally, note that the {@link #init(Object,String) init} hook method allows subclasses tocustomize the state of any objects created.
|
|
|
|
|
|