org.ops4j.pax.exam.junit
Annotation Type RequiresConfiguration


@Retention(value=RUNTIME)
@Target(value=METHOD)
public @interface RequiresConfiguration

Annotation that marks methods belonging into a certain context (those methods marked with Test). For example, you can have multiple configuration (see {$link org.ops4j.pax.exam.junit.Configuration}) but they belong to different contexts. So you annate both of them with this annotation. Then you annote the actual test method with exactly the same annotation. This approach makes configuration+test method coupling independent from nameing of methods (different from AppliesTo Annotation).

Since:
0.3.0, January 9, 2009
Author:
Toni Menzel (toni@okidokiteam.com)

Optional Element Summary
 java.lang.String[] value
          A string that is matched against any other context marker.
 

value

public abstract java.lang.String[] value
A string that is matched against any other context marker. By default (value not specified) the value is an empty string. So if you skip the annotation completely it still glues together all methods. (in this case you should not have clashing methods in your test class like multiple configurations).

Returns:
an arbitrary named string referencing this context.
Default:
""


Copyright © 2006-2012 OPS4J - Open Participation Software for Java. All Rights Reserved.