Package org.codehaus.modello
Class AbstractModelloJavaGeneratorTest
- java.lang.Object
-
- org.codehaus.modello.AbstractModelloGeneratorTest
-
- org.codehaus.modello.AbstractModelloJavaGeneratorTest
-
- All Implemented Interfaces:
org.codehaus.plexus.testing.PlexusTestConfiguration
public abstract class AbstractModelloJavaGeneratorTest extends AbstractModelloGeneratorTest
Base class for unit-tests of Modello plugins that generate java code.
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedAbstractModelloJavaGeneratorTest(java.lang.String name)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidaddClassPathFile(java.io.File file)protected voidaddDependency(java.lang.String groupId, java.lang.String artifactId)protected voidassertGeneratedFileExists(java.lang.String filename)protected voidcompileGeneratedSources()protected voidcompileGeneratedSources(int minJavaSource)protected voidcompileGeneratedSources(java.lang.String verifierId, int minJavaSource)java.util.List<java.io.File>getClasspath()protected java.util.List<java.lang.String>getClassPathElements()protected java.io.FilegetDependencyFile(java.lang.String groupId, java.lang.String artifactId)protected java.lang.StringgetModelloVersion()protected java.io.FilegetOutputClasses()protected java.io.FilegetOutputDirectory()protected voidprintClasspath(java.net.URLClassLoader classLoader)voidsetUp()protected voidverifyCompiledGeneratedSources(java.lang.String verifierClassName)Run a verifier class in a classloader context where compiled generated sources are available-
Methods inherited from class org.codehaus.modello.AbstractModelloGeneratorTest
createSaxParserWithSchema, customizeConfiguration, getModelloParameters, getModelloParameters, getModelloParameters, getName, getXmlResourceReader
-
-
-
-
Method Detail
-
setUp
public void setUp() throws java.lang.Exception- Overrides:
setUpin classAbstractModelloGeneratorTest- Throws:
java.lang.Exception
-
getOutputDirectory
protected java.io.File getOutputDirectory()
- Overrides:
getOutputDirectoryin classAbstractModelloGeneratorTest
-
getOutputClasses
protected java.io.File getOutputClasses()
-
addDependency
protected void addDependency(java.lang.String groupId, java.lang.String artifactId)
-
getDependencyFile
protected java.io.File getDependencyFile(java.lang.String groupId, java.lang.String artifactId)
-
getClasspath
public java.util.List<java.io.File> getClasspath()
-
getModelloVersion
protected java.lang.String getModelloVersion() throws java.io.IOException- Throws:
java.io.IOException
-
compileGeneratedSources
protected void compileGeneratedSources() throws java.io.IOException, org.codehaus.plexus.compiler.CompilerException- Throws:
java.io.IOExceptionorg.codehaus.plexus.compiler.CompilerException
-
compileGeneratedSources
protected void compileGeneratedSources(int minJavaSource) throws java.io.IOException, org.codehaus.plexus.compiler.CompilerException- Throws:
java.io.IOExceptionorg.codehaus.plexus.compiler.CompilerException
-
compileGeneratedSources
protected void compileGeneratedSources(java.lang.String verifierId, int minJavaSource) throws java.io.IOException, org.codehaus.plexus.compiler.CompilerException- Throws:
java.io.IOExceptionorg.codehaus.plexus.compiler.CompilerException
-
verifyCompiledGeneratedSources
protected void verifyCompiledGeneratedSources(java.lang.String verifierClassName)
Run a verifier class in a classloader context where compiled generated sources are available- Parameters:
verifierClassName- the class name of the verifier class
-
addClassPathFile
protected void addClassPathFile(java.io.File file)
-
printClasspath
protected void printClasspath(java.net.URLClassLoader classLoader)
-
assertGeneratedFileExists
protected void assertGeneratedFileExists(java.lang.String filename)
-
getClassPathElements
protected java.util.List<java.lang.String> getClassPathElements()
-
-