When executing an example method, the JExample framework caches its return value. If an example method declares dependencies and has arguments, the framework will inject the cache return values of the dependencies as parameters into the method execution. For more details, please refer to {@link ch.unibe.jexample.JExampleOptions @InjectionPolicy}.
An example method must have at least a {@link org.junit.Test @Test}annotation. The enclosing class must use an {@link org.junit.RunWith @RunWith} annotation to declare {@link ch.unibe.jexample.JExample JExampleRunner} as test runner.
An example method may return an instance of its unit under test.
An example method may depend on both successful execution and return value of other examples. If it does, it must declare the dependencies using an {@link ch.unibe.jexample.Given @Depends} annotation. An example methods withdependencies may have method parameters. The number of parameters must be less than or equal to the number of dependencies. The type of the n-th parameter must match the return type of the n-th dependency. @author Lea Haensenberger @author Adrian Kuhn
|
|
|
|