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
Base class for unit-tests of Modello plugins that generate java code.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate org.codehaus.plexus.compiler.Compiler -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidaddClassPathFile(File file) protected voidaddDependency(String groupId, String artifactId) protected voidassertGeneratedFileExists(String filename) protected voidprotected voidcompileGeneratedSources(int minJavaSource) protected voidcompileGeneratedSources(String verifierId, int minJavaSource) private voidcompileGeneratedSources(String verifierId, String javaSource) protected FilegetDependencyFile(String groupId, String artifactId) protected Stringprotected Fileprotected Fileprotected voidprintClasspath(URLClassLoader classLoader) voidsetUp()protected voidverifyCompiledGeneratedSources(String verifierClassName) Run a verifier class in a classloader context where compiled generated sources are availableMethods inherited from class org.codehaus.modello.AbstractModelloGeneratorTest
createSaxParserWithSchema, customizeConfiguration, getModelloParameters, getModelloParameters, getModelloParameters, getName, getXmlResourceReaderMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.codehaus.plexus.testing.PlexusTestConfiguration
customizeContainer
-
Field Details
-
dependencies
-
urls
-
classPathElements
-
compiler
@Inject private org.codehaus.plexus.compiler.Compiler compiler
-
-
Constructor Details
-
AbstractModelloJavaGeneratorTest
-
-
Method Details
-
setUp
- Overrides:
setUpin classAbstractModelloGeneratorTest- Throws:
Exception
-
getOutputDirectory
- Overrides:
getOutputDirectoryin classAbstractModelloGeneratorTest
-
getOutputClasses
-
addDependency
-
getDependencyFile
-
getClasspath
-
getModelloVersion
- Throws:
IOException
-
compileGeneratedSources
protected void compileGeneratedSources() throws IOException, org.codehaus.plexus.compiler.CompilerException- Throws:
IOExceptionorg.codehaus.plexus.compiler.CompilerException
-
compileGeneratedSources
protected void compileGeneratedSources(int minJavaSource) throws IOException, org.codehaus.plexus.compiler.CompilerException - Throws:
IOExceptionorg.codehaus.plexus.compiler.CompilerException
-
compileGeneratedSources
protected void compileGeneratedSources(String verifierId, int minJavaSource) throws IOException, org.codehaus.plexus.compiler.CompilerException - Throws:
IOExceptionorg.codehaus.plexus.compiler.CompilerException
-
compileGeneratedSources
private void compileGeneratedSources(String verifierId, String javaSource) throws IOException, org.codehaus.plexus.compiler.CompilerException - Throws:
IOExceptionorg.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
-
getClassPathElements
-