org.apache.neethi
Class PolicyTestCase

java.lang.Object
  extended by org.junit.Assert
      extended by org.apache.neethi.PolicyTestCase
Direct Known Subclasses:
BasicTestCases, IntersectTest, MergeTest, Normalize2Test, NormalizeTest

public abstract class PolicyTestCase
extends org.junit.Assert


Field Summary
protected  String baseDir
           
protected  PolicyBuilder policyEngine
           
protected  PolicyRegistry registry
           
protected  String testResourceDir
           
 
Constructor Summary
PolicyTestCase()
           
 
Method Summary
 Policy getPolicy(String name)
           
 Policy getPolicy(String name, int type)
           
 InputStream getResource(String name)
           
 Element getResourceAsDOM(String name)
           
 org.apache.axiom.om.OMElement getResourceAsElement(String name)
           
 javax.xml.stream.XMLStreamReader getResourceAsStax(String name)
           
 
Methods inherited from class org.junit.Assert
assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertThat, assertThat, assertTrue, assertTrue, fail, fail
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

baseDir

protected String baseDir

testResourceDir

protected String testResourceDir

policyEngine

protected PolicyBuilder policyEngine

registry

protected PolicyRegistry registry
Constructor Detail

PolicyTestCase

public PolicyTestCase()
Method Detail

getPolicy

public Policy getPolicy(String name)
                 throws Exception
Throws:
Exception

getPolicy

public Policy getPolicy(String name,
                        int type)
                 throws Exception
Throws:
Exception

getResource

public InputStream getResource(String name)
                        throws FileNotFoundException
Throws:
FileNotFoundException

getResourceAsDOM

public Element getResourceAsDOM(String name)
                         throws ParserConfigurationException,
                                SAXException,
                                IOException
Throws:
ParserConfigurationException
SAXException
IOException

getResourceAsStax

public javax.xml.stream.XMLStreamReader getResourceAsStax(String name)
                                                   throws javax.xml.stream.XMLStreamException,
                                                          javax.xml.stream.FactoryConfigurationError,
                                                          FileNotFoundException
Throws:
javax.xml.stream.XMLStreamException
javax.xml.stream.FactoryConfigurationError
FileNotFoundException

getResourceAsElement

public org.apache.axiom.om.OMElement getResourceAsElement(String name)
                                                   throws javax.xml.stream.XMLStreamException,
                                                          javax.xml.stream.FactoryConfigurationError,
                                                          FileNotFoundException
Throws:
javax.xml.stream.XMLStreamException
javax.xml.stream.FactoryConfigurationError
FileNotFoundException


Copyright © 2004-2012 The Apache Software Foundation. All Rights Reserved.