|
The Spring Framework | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT |
@Target(value={TYPE,METHOD}) @Retention(value=RUNTIME) @Inherited @Documented public @interface IfProfileValue
Test annotation to indicate that a test is enabled for a specific testing
environment. If the configured ProfileValueSource
returns a matching
value
for the provided name
, the test will
be enabled. This annotation can be applied at the class-level or
method-level.
Example: when using SystemProfileValueSource
as the
ProfileValueSource
implementation, you could configure a JUnit 4 test
method to run only on Java VMs from Sun Microsystems as follows:
@IfProfileValue(name="java.vendor", value="Sun Microsystems Inc.") @Test testSomething() { // ... }
ProfileValueSource
,
AbstractAnnotationAwareTransactionalTests
Required Element Summary | |
---|---|
String |
name
The name of the profile value against which to test. |
String |
value
The required value of the profile value for the
given name . |
Element Detail |
---|
public abstract String name
name
of the profile value against which to test.
public abstract String value
value
of the profile value for the
given name
.
|
The Spring Framework | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT |