Package org.codehaus.plexus
Class PlexusTestCase
java.lang.Object
junit.framework.Assert
junit.framework.TestCase
org.codehaus.plexus.PlexusTestCase
- All Implemented Interfaces:
junit.framework.Test
public abstract class PlexusTestCase
extends junit.framework.TestCase
- Author:
- Jason van Zyl, Trygve Laugstøl, Michal Maczka
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected PlexusConfigurationprotected voidcustomizeContainerConfiguration(ContainerConfiguration containerConfiguration) Allow custom test case implementations do augment the default container configuration before executing tests.protected voidcustomizeContext(Context context) static Stringprotected ClassLoaderprotected InputStreamprotected InputStreamgetConfiguration(String subname) protected StringgetConfigurationName(String subname) Allow the retrieval of a container configuration that is based on the name of the test class being run.protected PlexusContainerprotected Stringprotected InputStreamgetResourceAsStream(String resource) static StringgetTestConfiguration(Class<?> clazz) static FilegetTestFile(String path) static FilegetTestFile(String basedir, String path) static StringgetTestPath(String path) static StringgetTestPath(String basedir, String path) protected <T> Tprotected <T> Tprotected <T> Tprotected <T> Tprotected voidprotected voidsetUp()protected voidprotected voidtearDown()Methods inherited from class junit.framework.TestCase
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, countTestCases, createResult, fail, fail, failNotEquals, failNotSame, failSame, format, getName, run, run, runBare, runTest, setName, toString
-
Constructor Details
-
PlexusTestCase
public PlexusTestCase()
-
-
Method Details
-
setUp
- Overrides:
setUpin classjunit.framework.TestCase- Throws:
Exception
-
setupContainer
protected void setupContainer() -
customizeContainerConfiguration
Allow custom test case implementations do augment the default container configuration before executing tests.- Parameters:
containerConfiguration-ContainerConfiguration.
-
customizeContext
-
customizeComponentConfiguration
-
tearDown
- Overrides:
tearDownin classjunit.framework.TestCase- Throws:
Exception
-
getContainer
-
getConfiguration
- Throws:
Exception
-
getConfiguration
- Throws:
Exception
-
getCustomConfigurationName
-
getConfigurationName
Allow the retrieval of a container configuration that is based on the name of the test class being run. So if you have a test class called org.foo.FunTest, then this will produce a resource name of org/foo/FunTest.xml which would be used to configure the Plexus container before running your test.- Parameters:
subname- the subname- Returns:
- A configruation name
-
getResourceAsStream
-
getClassLoader
-
lookup
- Throws:
Exception
-
lookup
- Throws:
Exception
-
lookup
- Throws:
Exception
-
lookup
- Throws:
Exception
-
release
- Throws:
Exception
-
getTestFile
-
getTestFile
-
getTestPath
-
getTestPath
-
getBasedir
-
getTestConfiguration
-
getTestConfiguration
-