org.codehaus.plexus
Class PlexusTestCase

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by org.codehaus.plexus.PlexusTestCase
All Implemented Interfaces:
junit.framework.Test

public abstract class PlexusTestCase
extends junit.framework.TestCase

Version:
$Id: PlexusTestCase.java 6709 2007-07-30 23:50:38Z jvanzyl $
Author:
Jason van Zyl, Trygve Laugstøl, Michal Maczka

Field Summary
protected  PlexusContainer container
           
protected  Map context
           
 
Constructor Summary
PlexusTestCase()
           
 
Method Summary
protected  void customizeContext(Context context)
           
static String getBasedir()
           
protected  ClassLoader getClassLoader()
           
protected  InputStream getConfiguration()
           
protected  InputStream getConfiguration(String subname)
           
protected  String getConfigurationName(String subname)
           
protected  PlexusContainer getContainer()
           
protected  String getCustomConfigurationName()
           
protected  InputStream getResourceAsStream(String resource)
           
 String getTestConfiguration()
           
static String getTestConfiguration(Class clazz)
           
static File getTestFile(String path)
           
static File getTestFile(String basedir, String path)
           
static String getTestPath(String path)
           
static String getTestPath(String basedir, String path)
           
protected  Object lookup(Class componentClass)
           
protected  Object lookup(Class role, String id)
           
protected  Object lookup(String componentKey)
           
protected  Object lookup(String role, String id)
           
protected  void release(Object component)
           
protected  void setUp()
           
protected  void tearDown()
           
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, run, run, runBare, runTest, setName, 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

container

protected PlexusContainer container

context

protected Map context
Constructor Detail

PlexusTestCase

public PlexusTestCase()
Method Detail

setUp

protected void setUp()
              throws Exception
Overrides:
setUp in class junit.framework.TestCase
Throws:
Exception

customizeContext

protected void customizeContext(Context context)
                         throws Exception
Throws:
Exception

tearDown

protected void tearDown()
                 throws Exception
Overrides:
tearDown in class junit.framework.TestCase
Throws:
Exception

getContainer

protected PlexusContainer getContainer()

getConfiguration

protected InputStream getConfiguration()
                                throws Exception
Throws:
Exception

getConfiguration

protected InputStream getConfiguration(String subname)
                                throws Exception
Throws:
Exception

getCustomConfigurationName

protected String getCustomConfigurationName()

getConfigurationName

protected String getConfigurationName(String subname)
                               throws Exception
Throws:
Exception

getResourceAsStream

protected InputStream getResourceAsStream(String resource)

getClassLoader

protected ClassLoader getClassLoader()

lookup

protected Object lookup(String componentKey)
                 throws Exception
Throws:
Exception

lookup

protected Object lookup(String role,
                        String id)
                 throws Exception
Throws:
Exception

lookup

protected Object lookup(Class componentClass)
                 throws Exception
Throws:
Exception

lookup

protected Object lookup(Class role,
                        String id)
                 throws Exception
Throws:
Exception

release

protected void release(Object component)
                throws Exception
Throws:
Exception

getTestFile

public static File getTestFile(String path)

getTestFile

public static File getTestFile(String basedir,
                               String path)

getTestPath

public static String getTestPath(String path)

getTestPath

public static String getTestPath(String basedir,
                                 String path)

getBasedir

public static String getBasedir()

getTestConfiguration

public String getTestConfiguration()

getTestConfiguration

public static String getTestConfiguration(Class clazz)


Copyright © 2001-2007 Codehaus. All Rights Reserved.