java.lang.Object
com.sun.xacml.test.BasicTest
- All Implemented Interfaces:
- Test
- public class BasicTest
- extends java.lang.Object
- implements Test
A simple implementation of a single conformance test case.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
pdp
private com.sun.xacml.PDP pdp
module
private TestPolicyFinderModule module
policies
private java.util.Set policies
policyRefs
private java.util.Map policyRefs
policySetRefs
private java.util.Map policySetRefs
name
private java.lang.String name
errorExpected
private boolean errorExpected
experimental
private boolean experimental
BasicTest
public BasicTest(com.sun.xacml.PDP pdp,
TestPolicyFinderModule module,
java.util.Set policies,
java.util.Map policyRefs,
java.util.Map policySetRefs,
java.lang.String name,
boolean errorExpected,
boolean experimental)
- Constructor that accepts all values associatd with a test.
getInstance
public static BasicTest getInstance(org.w3c.dom.Node root,
com.sun.xacml.PDP pdp,
TestPolicyFinderModule module)
- Creates an instance of a test from its XML representation.
isAttrTrue
private static boolean isAttrTrue(org.w3c.dom.NamedNodeMap map,
java.lang.String attrName)
- Private helper that reads a attribute to see if it's set, and if so
if its value is "true".
getName
public java.lang.String getName()
- Description copied from interface:
Test
- Returns the name of this test.
- Specified by:
getName
in interface Test
isErrorExpected
public boolean isErrorExpected()
- Description copied from interface:
Test
- Returns whether an error is expected to happen (and is therefore a
success case).
- Specified by:
isErrorExpected
in interface Test
isExperimental
public boolean isExperimental()
- Description copied from interface:
Test
- Returns whether or not this is an experimental test, and therefore
not part of the required test cases.
- Specified by:
isExperimental
in interface Test
run
public int run(java.lang.String testPrefix)
- Description copied from interface:
Test
- Runs the test.
- Specified by:
run
in interface Test