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
master
Olivier Lamy 2012-05-04 10:00:32 +00:00
parent dfec22a65e
commit 7575a48961
1 changed files with 5 additions and 1 deletions

View File

@ -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() );