Package org.codehaus.modello
Class AbstractModelloJavaGeneratorTest
java.lang.Object
junit.framework.Assert
junit.framework.TestCase
org.codehaus.plexus.PlexusTestCase
org.codehaus.modello.AbstractModelloGeneratorTest
org.codehaus.modello.AbstractModelloJavaGeneratorTest
- All Implemented Interfaces:
junit.framework.Test
Base class for unit-tests of Modello plugins that generate java code.
- Author:
- Trygve Laugstøl
- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
addClassPathFile
(File file) protected void
addDependency
(String groupId, String artifactId) protected void
assertGeneratedFileExists
(String filename) protected void
protected void
compileGeneratedSources
(int minJavaSource) protected void
compileGeneratedSources
(String verifierId) protected void
compileGeneratedSources
(String verifierId, int minJavaSource) protected File
getDependencyFile
(String groupId, String artifactId) protected String
protected File
protected File
protected void
printClasspath
(URLClassLoader classLoader) protected void
setUp()
protected boolean
Check if a Java 5 feature test should be skipped, since it is not supported by current test environment.protected void
verifyCompiledGeneratedSources
(String verifierClassName) Run a verifier class in a classloader context where compiled generated sources are availableMethods inherited from class org.codehaus.modello.AbstractModelloGeneratorTest
createSaxParserWithSchema, customizeContainerConfiguration, getModelloParameters, getModelloParameters, getModelloParameters, getName, getXmlResourceReader
Methods inherited from class org.codehaus.plexus.PlexusTestCase
customizeContext, getBasedir, getClassLoader, getConfigurationName, getContainer, getCustomConfigurationName, getResourceAsStream, getTestConfiguration, getTestConfiguration, getTestFile, getTestFile, getTestPath, getTestPath, lookup, lookup, lookup, lookup, release, setupContainer, tearDown, teardownContainer
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, run, run, runBare, runTest, setName, toString
-
Constructor Details
-
AbstractModelloJavaGeneratorTest
-
-
Method Details
-
setUp
- Overrides:
setUp
in classAbstractModelloGeneratorTest
- Throws:
Exception
-
getOutputDirectory
- Overrides:
getOutputDirectory
in classAbstractModelloGeneratorTest
-
getOutputClasses
-
addDependency
-
getDependencyFile
-
getClasspath
-
getModelloVersion
- Throws:
IOException
-
compileGeneratedSources
protected void compileGeneratedSources() throws IOException, org.codehaus.plexus.compiler.CompilerException- Throws:
IOException
org.codehaus.plexus.compiler.CompilerException
-
compileGeneratedSources
protected void compileGeneratedSources(int minJavaSource) throws IOException, org.codehaus.plexus.compiler.CompilerException - Throws:
IOException
org.codehaus.plexus.compiler.CompilerException
-
compileGeneratedSources
protected void compileGeneratedSources(String verifierId) throws IOException, org.codehaus.plexus.compiler.CompilerException - Throws:
IOException
org.codehaus.plexus.compiler.CompilerException
-
compileGeneratedSources
protected void compileGeneratedSources(String verifierId, int minJavaSource) throws IOException, org.codehaus.plexus.compiler.CompilerException - Throws:
IOException
org.codehaus.plexus.compiler.CompilerException
-
verifyCompiledGeneratedSources
Run a verifier class in a classloader context where compiled generated sources are available- Parameters:
verifierClassName
- the class name of the verifier class
-
addClassPathFile
-
printClasspath
-
assertGeneratedFileExists
-
skipJava5FeatureTest
protected boolean skipJava5FeatureTest()Check if a Java 5 feature test should be skipped, since it is not supported by current test environment.- Returns:
true
if Java 5 is not available, then feature test should be skipped by caller
-
getClassPathElements
-