Package org.apache.maven.scm
Class PlexusJUnit4TestSupport
java.lang.Object
org.apache.maven.scm.PlexusJUnit4TestSupport
- Direct Known Subclasses:
ScmTestCase
Based on PlexusTestCase from org.sonatype.sisu:sisu-inject-plexus.
Note: this class is copied from maven-release.
- Author:
- Robert Scholte
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected org.codehaus.plexus.configuration.PlexusConfigurationprotected voidcustomizeContainerConfiguration(org.codehaus.plexus.ContainerConfiguration containerConfiguration) Allow custom test case implementations do augment the default container configuration before executing tests.protected voidcustomizeContext(org.codehaus.plexus.context.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 org.codehaus.plexus.PlexusContainerprotected Stringprotected com.google.inject.Module[]Allows test to define custom modules.protected StringgetName()protected 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 Objectprotected Objectprotected voidvoidsetUp()protected voidvoidtearDown()
-
Field Details
-
testName
-
-
Constructor Details
-
PlexusJUnit4TestSupport
public PlexusJUnit4TestSupport()
-
-
Method Details
-
setUp
- Throws:
Exception
-
getName
-
setupContainer
-
getCustomModules
Allows test to define custom modules. -
customizeContainerConfiguration
protected void customizeContainerConfiguration(org.codehaus.plexus.ContainerConfiguration containerConfiguration) Allow custom test case implementations do augment the default container configuration before executing tests.- Parameters:
containerConfiguration-
-
customizeContext
-
customizeComponentConfiguration
-
tearDown
- 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-- Returns:
-
getResourceAsStream
-
getClassLoader
-
lookup
- Throws:
Exception
-
lookup
- Throws:
Exception
-
lookup
- Throws:
Exception
-
lookup
- Throws:
Exception
-
lookupMap
- Throws:
Exception
-
release
- Throws:
Exception
-
getTestFile
-
getTestFile
-
getTestPath
-
getTestPath
-
getBasedir
-
getTestConfiguration
-
getTestConfiguration
-