|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT | |||||||||
@Retention(value=RUNTIME)
@Target(value={TYPE,FIELD,METHOD})
@Documented
public @interface TestExtension
Works like Extension except used for inserting extensions during unit tests.
This annotation must be used on a method/field of a test case class, or an nested type of the test case. The extensions are activated only when the outer test class is being run.
TestExtensionLoader| Optional Element Summary | |
|---|---|
String |
value
To make this extension only active for one test case, specify the test method name. |
public abstract String value
class FooTest extends HudsonTestCase {
public void test1() { ... }
public void test2() { ... }
// this only kicks in during test1
@TestExtension("test1")
class Foo extends ConsoleAnnotator { ... }
// this kicks in both for test1 and test2
@TestExtension
class Bar extends ConsoleAnnotator { ... }
}
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT | |||||||||