You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by ol...@apache.org on 2012/05/04 12:00:33 UTC
svn commit: r1333837 -
/maven/plugin-tools/branches/MPLUGIN-189/maven-plugin-tools-annotations/src/test/java/org/apache/maven/tools/plugin/annotations/TestAnnotationsReader.java
Author: olamy
Date: Fri May 4 10:00:32 2012
New Revision: 1333837
URL: http://svn.apache.org/viewvc?rev=1333837&view=rev
Log:
test we have className and parentClassName after scanning
Modified:
maven/plugin-tools/branches/MPLUGIN-189/maven-plugin-tools-annotations/src/test/java/org/apache/maven/tools/plugin/annotations/TestAnnotationsReader.java
Modified: maven/plugin-tools/branches/MPLUGIN-189/maven-plugin-tools-annotations/src/test/java/org/apache/maven/tools/plugin/annotations/TestAnnotationsReader.java
URL: http://svn.apache.org/viewvc/maven/plugin-tools/branches/MPLUGIN-189/maven-plugin-tools-annotations/src/test/java/org/apache/maven/tools/plugin/annotations/TestAnnotationsReader.java?rev=1333837&r1=1333836&r2=1333837&view=diff
==============================================================================
--- maven/plugin-tools/branches/MPLUGIN-189/maven-plugin-tools-annotations/src/test/java/org/apache/maven/tools/plugin/annotations/TestAnnotationsReader.java (original)
+++ maven/plugin-tools/branches/MPLUGIN-189/maven-plugin-tools-annotations/src/test/java/org/apache/maven/tools/plugin/annotations/TestAnnotationsReader.java Fri May 4 10:00:32 2012
@@ -18,11 +18,12 @@ package org.apache.maven.tools.plugin.an
* under the License.
*/
+import org.apache.maven.plugin.AbstractMojo;
import org.apache.maven.tools.plugin.annotations.datamodel.ComponentAnnotationContent;
+import org.apache.maven.tools.plugin.annotations.datamodel.ParameterAnnotationContent;
import org.apache.maven.tools.plugin.annotations.scanner.MojoAnnotatedClass;
import org.apache.maven.tools.plugin.annotations.scanner.MojoAnnotationsScanner;
import org.apache.maven.tools.plugin.annotations.scanner.MojoAnnotationsScannerRequest;
-import org.apache.maven.tools.plugin.annotations.datamodel.ParameterAnnotationContent;
import org.codehaus.plexus.PlexusTestCase;
import org.fest.assertions.Assertions;
@@ -54,6 +55,9 @@ public class TestAnnotationsReader
MojoAnnotatedClass mojoAnnotatedClass = mojoAnnotatedClasses.get( 0 );
+ assertEquals( FooMojo.class.getName(), mojoAnnotatedClass.getClassName() );
+ assertEquals( AbstractMojo.class.getName(), mojoAnnotatedClass.getParentClassName() );
+
Mojo mojo = mojoAnnotatedClass.getMojo();
assertEquals( "foo", mojo.name() );