Rio Project 4.2 API Documentation



org.rioproject.test
Annotation Type IfPropertySet


@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

name

public abstract String name
The name of the system property against which to obtain.

Returns:
The name of the property.

value

public abstract String value
The value of the property for the given name.

Returns:
The value of the property
Default:
""

notvalue

public abstract String notvalue
The value of the property for the given name.

Returns:
The value of the property
Default:
""

Copyright © Rio Project.

Copyright © 2006-2011 Rio Project. All Rights Reserved.