Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

com.sun.xacml.test
Class BasicTest  view BasicTest download BasicTest.java

java.lang.Object
  extended bycom.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.


Field Summary
private  boolean errorExpected
           
private  boolean experimental
           
private  TestPolicyFinderModule module
           
private  java.lang.String name
           
private  com.sun.xacml.PDP pdp
           
private  java.util.Set policies
           
private  java.util.Map policyRefs
           
private  java.util.Map policySetRefs
           
 
Constructor Summary
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.
 
Method Summary
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.
 java.lang.String getName()
          Returns the name of this test.
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".
 boolean isErrorExpected()
          Returns whether an error is expected to happen (and is therefore a success case).
 boolean isExperimental()
          Returns whether or not this is an experimental test, and therefore not part of the required test cases.
 int run(java.lang.String testPrefix)
          Runs the test.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

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
Constructor Detail

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.

Method Detail

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