|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT | |||||||||
@Retention(value=RUNTIME) @Inherited @Documented public @interface IfPropertySet
Annotation to indicate that a test is to be run if a specific property is set.
Note: @IfProfileValue can be applied at either the
class or method level.
Examples: You can configure a test method to run only on Java VMs from Sun Microsystems as follows:
@IfPropertySet(name="java.vendor", value="Sun Microsystems Inc.")
testSomething() {
// ...
}
Or you can select to run if Windows is the operating system:
@IfPropertySet(name="os.name", value="Windows*")
testSomething() {
// ...
}
The '*' in the value acts as a wildcard (when placed as the last character of the value string)
Or you can select to run if Windows is not the operating system:
@IfPropertySet(name="os.name", notvalue="Windows*")
testSomething() {
// ...
}
| Required Element Summary | |
|---|---|
String |
name
The name of the system property against which to obtain. |
| Optional Element Summary | |
|---|---|
String |
notvalue
The value of the property for the given name. |
String |
value
The value of the property for the given name. |
| Element Detail |
|---|
public abstract String name
name of the system property against which to obtain.
name of the property.public abstract String value
value of the property for the given name.
public abstract String notvalue
value of the property for the given name.
|
Copyright © Rio Project. | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT | |||||||||