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

public abstract class AbstractModelloJavaGeneratorTest extends AbstractModelloGeneratorTest
Base class for unit-tests of Modello plugins that generate java code.
Author:
Trygve Laugstøl
See Also:
  • Constructor Details

    • AbstractModelloJavaGeneratorTest

      protected AbstractModelloJavaGeneratorTest(String name)
  • Method Details

    • setUp

      protected void setUp() throws Exception
      Overrides:
      setUp in class AbstractModelloGeneratorTest
      Throws:
      Exception
    • getOutputDirectory

      protected File getOutputDirectory()
      Overrides:
      getOutputDirectory in class AbstractModelloGeneratorTest
    • getOutputClasses

      protected File getOutputClasses()
    • addDependency

      protected void addDependency(String groupId, String artifactId)
    • getDependencyFile

      protected File getDependencyFile(String groupId, String artifactId)
    • getClasspath

      public List<File> getClasspath()
    • getModelloVersion

      protected String getModelloVersion() throws IOException
      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

      protected void verifyCompiledGeneratedSources(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(File file)
    • printClasspath

      protected void printClasspath(URLClassLoader classLoader)
    • assertGeneratedFileExists

      protected void assertGeneratedFileExists(String filename)
    • 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

      protected List<String> getClassPathElements()