org.codehaus.modello
Class AbstractModelloJavaGeneratorTest

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by org.codehaus.plexus.PlexusTestCase
              extended by org.codehaus.modello.AbstractModelloGeneratorTest
                  extended by 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.

Version:
$Id: AbstractModelloJavaGeneratorTest.java 1252 2009-06-27 11:36:54Z bentmann $
Author:
Trygve Laugstøl

Field Summary
 
Fields inherited from class org.codehaus.plexus.PlexusTestCase
basedir, container
 
Constructor Summary
protected AbstractModelloJavaGeneratorTest(String name)
           
 
Method Summary
protected  void addClassPathFile(File file)
           
 void addDependency(String groupId, String artifactId, String version)
           
protected  void assertGeneratedFileExists(String filename)
           
protected  void compile(File generatedSources, File destinationDirectory)
           
protected  void compile(File generatedSources, File destinationDirectory, boolean useJava5)
           
 List getClasspath()
           
protected  List getClassPathElements()
           
protected  File getDepedencyFile(String groupId, String artifactId, String version)
           
protected  String getModelloVersion()
           
protected  File getOutputClasses()
           
protected  File getOutputDirectory()
           
protected  void printClasspath(URLClassLoader classLoader)
           
protected  void setUp()
           
protected  void verify(String className, String testName)
           
 
Methods inherited from class org.codehaus.modello.AbstractModelloGeneratorTest
getName, getXmlResourceReader
 
Methods inherited from class org.codehaus.plexus.PlexusTestCase
createContainerInstance, customizeContext, customizeContext, getBasedir, getClassLoader, getConfiguration, getConfiguration, getContainer, getCustomConfiguration, getResourceAsStream, getTestFile, getTestFile, getTestPath, getTestPath, lookup, lookup, release, tearDown
 
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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AbstractModelloJavaGeneratorTest

protected AbstractModelloJavaGeneratorTest(String name)
Method Detail

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

public void addDependency(String groupId,
                          String artifactId,
                          String version)
                   throws MalformedURLException
Throws:
MalformedURLException

getDepedencyFile

protected File getDepedencyFile(String groupId,
                                String artifactId,
                                String version)

getClasspath

public List getClasspath()

getModelloVersion

protected String getModelloVersion()
                            throws IOException
Throws:
IOException

compile

protected void compile(File generatedSources,
                       File destinationDirectory)
                throws IOException,
                       org.codehaus.plexus.compiler.CompilerException
Throws:
IOException
org.codehaus.plexus.compiler.CompilerException

compile

protected void compile(File generatedSources,
                       File destinationDirectory,
                       boolean useJava5)
                throws IOException,
                       org.codehaus.plexus.compiler.CompilerException
Throws:
IOException
org.codehaus.plexus.compiler.CompilerException

verify

protected void verify(String className,
                      String testName)
               throws MalformedURLException
Throws:
MalformedURLException

addClassPathFile

protected void addClassPathFile(File file)
                         throws MalformedURLException
Throws:
MalformedURLException

printClasspath

protected void printClasspath(URLClassLoader classLoader)

assertGeneratedFileExists

protected void assertGeneratedFileExists(String filename)

getClassPathElements

protected List getClassPathElements()


Copyright © 2001-2013 Codehaus. All Rights Reserved.