edu.sdsc.inca.repository
Class RepositoriesTest

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

public class RepositoriesTest
extends junit.framework.TestCase

Some testing of Repositories. More testing resides in AgentClientTest and some of those should be moved over eventually.

Author:
Shava Smallen <ssmallen@sdsc.edu>

Constructor Summary
RepositoriesTest()
           
 
Method Summary
static Repositories createSampleRepository(java.lang.String dirPath)
          Create a small repository which can be used in testing.
 void testGetRepositoryForPackage()
          Test function getRepositoryForPackage
 void testPersistence()
          Test constructor and save
 void testVersionCompare()
          Test ability to compare versions
 
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

RepositoriesTest

public RepositoriesTest()
Method Detail

createSampleRepository

public static Repositories createSampleRepository(java.lang.String dirPath)
                                           throws java.lang.Exception
Create a small repository which can be used in testing. Provides the basic libraries, Reporter.pm, Version.pm, and SimpleUnit, along with 5 reporters: gcc version reporter, openssl version reporter, tgcp unit reporter, myproxy unit reporter, and globus 2 gatekeeper unit test. It will download the packages directly from the Inca SVN repository. Note this directory will be cleaned up upon program exit.

Parameters:
dirPath - Specify a directory for the repository. If null a temporary directory will be used.
Returns:
The url for the local repository.
Throws:
java.lang.Exception

testGetRepositoryForPackage

public void testGetRepositoryForPackage()
                                 throws java.lang.Exception
Test function getRepositoryForPackage

Throws:
java.lang.Exception

testVersionCompare

public void testVersionCompare()
                        throws java.lang.Exception
Test ability to compare versions

Throws:
java.lang.Exception

testPersistence

public void testPersistence()
                     throws java.lang.Exception
Test constructor and save

Throws:
java.lang.Exception