edu.sdsc.inca.repository
Class RepositoriesTest

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by edu.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 - if unable to create repository

testGetRepositoryForPackage

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

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

testVersionCompare

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

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

testPersistence

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

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