edu.sdsc.inca.agent
Class RepositoryCacheTest

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

public class RepositoryCacheTest
extends junit.framework.TestCase

Created by IntelliJ IDEA.

Author:
Shava Smallen <ssmallen@sdsc.edu>

Field Summary
static java.lang.String cacheLocation
           
static java.lang.String repositoryLocation
           
 
Constructor Summary
RepositoryCacheTest()
           
 
Method Summary
static RepositoryCache createSampleRepositoryCache(edu.sdsc.inca.repository.Repositories repositories)
          Create a local repository cache using selected reporters from the supplied repository
static edu.sdsc.inca.repository.Repositories setupRepository()
          Setup a repositories object to a local repository
 void testFetch()
          Test ability to fetch packages from a repository
 void testGetPackage()
          Test ability to get package info and content once fetched
 void testParsePackage()
          Test ability to convert package name into file
 void testPython()
          Test python module detection method
 void testRepo()
          Test ability to create a repository cache from a repository
 void testUpdate()
          Test ability to update packages in repository cache
 
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
 

Field Detail

repositoryLocation

public static final java.lang.String repositoryLocation
See Also:
Constant Field Values

cacheLocation

public static final java.lang.String cacheLocation
See Also:
Constant Field Values
Constructor Detail

RepositoryCacheTest

public RepositoryCacheTest()
Method Detail

createSampleRepositoryCache

public static RepositoryCache createSampleRepositoryCache(edu.sdsc.inca.repository.Repositories repositories)
                                                   throws java.io.IOException
Create a local repository cache using selected reporters from the supplied repository

Parameters:
repositories - A Inca package repository
Returns:
A repository cache object to a local repository cache
Throws:
java.io.IOException - if unable to create repository cache

setupRepository

public static edu.sdsc.inca.repository.Repositories setupRepository()
                                                             throws java.lang.Exception
Setup a repositories object to a local repository

Returns:
A repositories object
Throws:
java.lang.Exception - if trouble setting up repository

testFetch

public void testFetch()
               throws java.lang.Exception
Test ability to fetch packages from a repository

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

testGetPackage

public void testGetPackage()
                    throws java.lang.Exception
Test ability to get package info and content once fetched

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

testParsePackage

public void testParsePackage()
                      throws java.lang.Exception
Test ability to convert package name into file

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

testPython

public void testPython()
                throws java.lang.Exception
Test python module detection method

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

testRepo

public void testRepo()
              throws java.lang.Exception
Test ability to create a repository cache from a repository

Throws:
java.lang.Exception

testUpdate

public void testUpdate()
                throws java.lang.Exception
Test ability to update packages in repository cache

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