From 7575a489618e481a0f219fc0a08a1d31be641006 Mon Sep 17 00:00:00 2001 From: Olivier Lamy Date: Fri, 4 May 2012 10:00:32 +0000 Subject: [PATCH] test we have className and parentClassName after scanning git-svn-id: https://svn.apache.org/repos/asf/maven/plugin-tools/branches/MPLUGIN-189@1333837 13f79535-47bb-0310-9956-ffa450edef68 --- .../tools/plugin/annotations/TestAnnotationsReader.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/maven-plugin-tools-annotations/src/test/java/org/apache/maven/tools/plugin/annotations/TestAnnotationsReader.java b/maven-plugin-tools-annotations/src/test/java/org/apache/maven/tools/plugin/annotations/TestAnnotationsReader.java index 70d2145..e49b38f 100644 --- a/maven-plugin-tools-annotations/src/test/java/org/apache/maven/tools/plugin/annotations/TestAnnotationsReader.java +++ b/maven-plugin-tools-annotations/src/test/java/org/apache/maven/tools/plugin/annotations/TestAnnotationsReader.java @@ -18,11 +18,12 @@ package org.apache.maven.tools.plugin.annotations; * 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() );