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.PlexusConfiguration
protected void
customizeContainerConfiguration
(org.codehaus.plexus.ContainerConfiguration containerConfiguration) Allow custom test case implementations do augment the default container configuration before executing tests.protected void
customizeContext
(org.codehaus.plexus.context.Context context) static String
protected ClassLoader
protected InputStream
protected InputStream
getConfiguration
(String subname) protected String
getConfigurationName
(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.PlexusContainer
protected String
protected com.google.inject.Module[]
Allows test to define custom modules.protected String
getName()
protected InputStream
getResourceAsStream
(String resource) 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 <T> T
protected <T> T
protected Object
protected Object
protected void
void
setUp()
protected void
void
tearDown()
-
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
-