public abstract class AbstractSpecCreator extends Object implements SpecCreator
| Constructor and Description |
|---|
AbstractSpecCreator() |
| Modifier and Type | Method and Description |
|---|---|
void |
afterSpecRun()
Callback that is called after the spec is executed.
|
void |
beforeSpecRun()
Callback that is called before the spec is executed.
|
protected abstract <T> T |
create(Class<T> klass) |
<T> T |
createSpec(Class<T> klass)
Creates a spec or feature instance.
|
<T> T |
createSubject(Class<T> klass)
Creates the subject of a spec.
|
public <T> T createSpec(Class<T> klass)
SpecCreator
@code
describe Greeter{
fact subject.sayHello() => "Hello World"
}
the parameter klass will be the generated
GreeterSpec class and this method should return
an instance of GreeterSpec.createSpec in interface SpecCreatorklass - the spec typepublic <T> T createSubject(Class<T> klass)
SpecCreator
@code
describe Greeter{
fact subject.sayHello() => "Hello World"
}
the parameter klass will be the subject's class
Greeter and this method should return
an instance of Greeter.createSubject in interface SpecCreatorklass - the subject typeprotected abstract <T> T create(Class<T> klass)
public void beforeSpecRun()
SpecCreatorbeforeSpecRun in interface SpecCreatorpublic void afterSpecRun()
SpecCreatorafterSpecRun in interface SpecCreatorCopyright © 2012-2014 BMW Car IT. All Rights Reserved.