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
 void testHasRunNowMatch()
          test the mergeSeriesConfig function
 void testMergeSeriesConfig()
          test the mergeSeriesConfig function
 void testRemoveSeriesConfig()
          test the removeSeriesConfig 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

Parameters:
repositories - The repository that contains listed reporters
Returns:
A SuiteWrapper object containing the above suite.
Throws:
ConfigurationException - if unable to resolve reporters
org.apache.xmlbeans.XmlException - if unable to create sample suite

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

Parameters:
repos - The repository that contains listed reporters
Returns:
A SuiteWrapper object containing the above suite.
Throws:
ConfigurationException - if unable to resolve reporters
org.apache.xmlbeans.XmlException - if unable to create suite

testBlankSuite

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

Throws:
java.lang.Exception - if problem running test

testChangeAction

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

Throws:
java.lang.Exception - if problem running test

testDiff

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

Throws:
java.lang.Exception - if problem running test

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 - if unable to resolve reporters

testHasRunNowMatch

public void testHasRunNowMatch()
                        throws java.lang.Exception
test the mergeSeriesConfig function

Throws:
java.lang.Exception - if problem running test

testMergeSeriesConfig

public void testMergeSeriesConfig()
                           throws java.lang.Exception
test the mergeSeriesConfig function

Throws:
java.lang.Exception - if problem running test

testRemoveSeriesConfig

public void testRemoveSeriesConfig()
                            throws java.lang.Exception
test the removeSeriesConfig function

Throws:
java.lang.Exception - if problem running test