org.apache.maven.tools.plugin.extractor.java
Class JavaMojoDescriptorExtractorTest

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by org.apache.maven.tools.plugin.extractor.java.JavaMojoDescriptorExtractorTest
All Implemented Interfaces:
Test

public class JavaMojoDescriptorExtractorTest
extends TestCase

Author:
jdcasey

Constructor Summary
JavaMojoDescriptorExtractorTest()
           
 
Method Summary
protected  void checkExpected(String directory)
          compare mojos from generated plugin.xml against plugin-expected.xml
protected  List<MojoDescriptor> extract(String directory)
          extract plugin descriptor for test resources directory and check against plugin-expected.xml
protected  PluginDescriptor generate(String directory)
          generate plugin.xml for a test resources directory content.
protected  void setUp()
           
 void testAnnotationInPlugin()
          Check that the mojo descriptor extractor will ignore any annotations that are found.
 void testJava15SyntaxParsing()
          Check that the mojo descriptor extractor will successfully parse sources with Java 1.5 language features like generics.
 void testMaven30Parameters()
           
 void testShouldFindTwoMojoDescriptorsInTestSourceDirectory()
           
 void testShouldPropagateImplementationParameter()
           
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, run, run, runBare, runTest, setName, tearDown, toString
 
Methods inherited from class junit.framework.Assert
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, fail, fail, failNotEquals, failNotSame, failSame
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

JavaMojoDescriptorExtractorTest

public JavaMojoDescriptorExtractorTest()
Method Detail

setUp

protected void setUp()
Overrides:
setUp in class TestCase

generate

protected PluginDescriptor generate(String directory)
                             throws Exception
generate plugin.xml for a test resources directory content.

Throws:
Exception

checkExpected

protected void checkExpected(String directory)
                      throws Exception
compare mojos from generated plugin.xml against plugin-expected.xml

Throws:
Exception

extract

protected List<MojoDescriptor> extract(String directory)
                                throws Exception
extract plugin descriptor for test resources directory and check against plugin-expected.xml

Throws:
Exception

testShouldFindTwoMojoDescriptorsInTestSourceDirectory

public void testShouldFindTwoMojoDescriptorsInTestSourceDirectory()
                                                           throws Exception
Throws:
Exception

testShouldPropagateImplementationParameter

public void testShouldPropagateImplementationParameter()
                                                throws Exception
Throws:
Exception

testMaven30Parameters

public void testMaven30Parameters()
                           throws Exception
Throws:
Exception

testAnnotationInPlugin

public void testAnnotationInPlugin()
                            throws Exception
Check that the mojo descriptor extractor will ignore any annotations that are found.

Throws:
Exception

testJava15SyntaxParsing

public void testJava15SyntaxParsing()
                             throws Exception
Check that the mojo descriptor extractor will successfully parse sources with Java 1.5 language features like generics.

Throws:
Exception


Copyright © 2004-2012 The Apache Software Foundation. All Rights Reserved.