edu.sdsc.inca.util
Class ResourcesWrapperTest

java.lang.Object
  extended byjunit.framework.Assert
      extended byjunit.framework.TestCase
          extended byedu.sdsc.inca.util.ResourcesWrapperTest
All Implemented Interfaces:
junit.framework.Test

public class ResourcesWrapperTest
extends junit.framework.TestCase

A tester class for ResourcesWrapper. Tests constructor and getValue(s). User: ssmallen


Constructor Summary
ResourcesWrapperTest()
           
 
Method Summary
static ResourcesWrapper createSampleResources()
          Returns a sample resource configuration file that can be used in tests.
 void testConstructorAndSave()
          Test the constructor and save/read capabilities
 void testEnvironVars()
          Test the ability to properly expand macros with $ in the value
 void testEscape()
          Test the ability to properly escape XML
 void testExpand()
          Test ability to expand macros
 void testGetResources()
          Test getResources
 void testGetResourcesByXpath()
          Test getResources by xpath
 void testGetValues()
          Test getValue[s]
 void testHostEquivalence()
          Test getResources using host equivalence
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, run, run, runBare, runTest, setName, setUp, tearDown, toString
 
Methods inherited from class junit.framework.Assert
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ResourcesWrapperTest

public ResourcesWrapperTest()
Method Detail

createSampleResources

public static ResourcesWrapper createSampleResources()
                                              throws org.apache.xmlbeans.XmlException
Returns a sample resource configuration file that can be used in tests.

Returns:
A ResourcesWrapper object containing sample resources
Throws:
org.apache.xmlbeans.XmlException

testConstructorAndSave

public void testConstructorAndSave()
                            throws java.lang.Exception
Test the constructor and save/read capabilities

Throws:
java.lang.Exception

testEnvironVars

public void testEnvironVars()
                     throws java.lang.Exception
Test the ability to properly expand macros with $ in the value

Throws:
java.lang.Exception

testEscape

public void testEscape()
                throws java.lang.Exception
Test the ability to properly escape XML

Throws:
java.lang.Exception

testExpand

public void testExpand()
                throws java.lang.Exception
Test ability to expand macros

Throws:
java.lang.Exception

testGetResources

public void testGetResources()
                      throws java.lang.Exception
Test getResources

Throws:
java.lang.Exception

testGetResourcesByXpath

public void testGetResourcesByXpath()
                             throws java.lang.Exception
Test getResources by xpath

Throws:
java.lang.Exception

testGetValues

public void testGetValues()
                   throws java.lang.Exception
Test getValue[s]

Throws:
java.lang.Exception

testHostEquivalence

public void testHostEquivalence()
                         throws java.lang.Exception
Test getResources using host equivalence

Throws:
java.lang.Exception