|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jnario.lib.AbstractSpecCreator
public abstract class AbstractSpecCreator
| Constructor Summary | |
|---|---|
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. |
|
protected abstract
|
create(Class<T> klass)
|
|
|
createSpec(Class<T> klass)
Creates a spec or feature instance. |
|
|
createSubject(Class<T> klass)
Creates the subject of a spec. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public AbstractSpecCreator()
| Method Detail |
|---|
public <T> T createSpec(Class<T> klass)
SpecCreator
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}.
createSpec in interface SpecCreatorklass - the spec type
public <T> T createSubject(Class<T> klass)
SpecCreator
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}.
createSubject in interface SpecCreatorklass - the subject type
protected abstract <T> T create(Class<T> klass)
public void beforeSpecRun()
SpecCreator
beforeSpecRun in interface SpecCreatorpublic void afterSpecRun()
SpecCreator
afterSpecRun in interface SpecCreator
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||