edu.sdsc.inca.util
Class SuiteWrapperTest

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by edu.sdsc.inca.util.SuiteWrapperTest
All Implemented Interfaces:
junit.framework.Test

public class SuiteWrapperTest
extends junit.framework.TestCase

Tests the SuiteWrapper class

Author:
Shava Smallen <ssmallen@sdsc.edu>

Constructor Summary
SuiteWrapperTest()
           
 
Method Summary
static SuiteWrapper createSampleSuite(Repositories repositories)
          Creates a suite with the following reporters: gcc version reporter running on resource teragrid myproxy unit reporter running on resource teragrid gatekeeper unit reporter running on resource teragrid tgcp unit reporter running on resource teragrid
static SuiteWrapper createSampleSuiteModification(Repositories repos)
          Creates a suite with the following reporters: deletes gcc version reporter running on resource teragrid adds gcc version reporter running on resource sdsc deletes myproxy unit reporter running on resource teragrid
static void resolveReporterNames(SuiteWrapper suite, Repositories repositories)
          Replace the reporter names with reporter uris.
 void testBlankSuite()
          Test good behavior when dealing with a blank suite
 void testChangeAction()
          test the changeAction function
 void testDiff()
          Test the diff function
 
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

SuiteWrapperTest

public SuiteWrapperTest()
Method Detail

createSampleSuite

public static SuiteWrapper createSampleSuite(Repositories repositories)
                                      throws org.apache.xmlbeans.XmlException,
                                             ConfigurationException
Creates a suite with the following reporters: gcc version reporter running on resource teragrid myproxy unit reporter running on resource teragrid gatekeeper unit reporter running on resource teragrid tgcp unit reporter running on resource teragrid

Returns:
A SuiteWrapper object containing the above suite.
Throws:
org.apache.xmlbeans.XmlException
ConfigurationException

createSampleSuiteModification

public static SuiteWrapper createSampleSuiteModification(Repositories repos)
                                                  throws org.apache.xmlbeans.XmlException,
                                                         ConfigurationException
Creates a suite with the following reporters: deletes gcc version reporter running on resource teragrid adds gcc version reporter running on resource sdsc deletes myproxy unit reporter running on resource teragrid

Returns:
A SuiteWrapper object containing the above suite.
Throws:
org.apache.xmlbeans.XmlException
ConfigurationException

testBlankSuite

public void testBlankSuite()
                    throws java.lang.Exception
Test good behavior when dealing with a blank suite

Throws:
java.lang.Exception

testChangeAction

public void testChangeAction()
                      throws java.lang.Exception
test the changeAction function

Throws:
java.lang.Exception

testDiff

public void testDiff()
              throws java.lang.Exception
Test the diff function

Throws:
java.lang.Exception

resolveReporterNames

public static void resolveReporterNames(SuiteWrapper suite,
                                        Repositories repositories)
                                 throws ConfigurationException
Replace the reporter names with reporter uris.

Parameters:
suite - A suite containing reporter names.
repositories - Where to pick up reporter uris.
Throws:
ConfigurationException