|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface SpecCreator
A factory for creating features or specs together with their subjects. It can
be used to customize the creation of a specification to use, for example,
to use a dependency injection container or a mocking framework. Implementations
should override AbstractSpecCreator.
| Method Summary | ||
|---|---|---|
void |
afterSpecRun()
Callback that is called after the spec is executed. |
|
void |
beforeSpecRun()
Callback that is called before the spec is executed. |
|
|
createSpec(Class<T> klass)
Creates a spec or feature instance. |
|
|
createSubject(Class<T> klass)
Creates the subject of a spec. |
|
| Method Detail |
|---|
<T> T createSpec(Class<T> klass)
describe Greeter{
fact subject.sayHello() => "Hello World"
}
the parameter klass will be the generated
{@code GreeterSpec} class and this method should return
an instance of {@code GreeterSpec}.
klass - the spec type
<T> T createSubject(Class<T> klass)
describe Greeter{
fact subject.sayHello() => "Hello World"
}
the parameter klass will be the subject's class
{@code Greeter} and this method should return
an instance of {@code Greeter}.
klass - the subject type
void beforeSpecRun()
void afterSpecRun()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||