Skip to content

Commit

Permalink
[MPLUGIN-387] Switch from fest-assert to AssertJ 2.9.1
Browse files Browse the repository at this point in the history
  • Loading branch information
slachiewicz committed Jan 10, 2022
1 parent 9ff352c commit d296e04
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
6 changes: 3 additions & 3 deletions maven-plugin-tools-annotations/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -110,9 +110,9 @@
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.easytesting</groupId>
<artifactId>fest-assert</artifactId>
<version>1.4</version>
<groupId>org.assertj</groupId>
<artifactId>assertj-core</artifactId>
<version>2.9.1</version><!-- Java 7 -->
<scope>test</scope>
</dependency>
</dependencies>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,15 @@
import org.apache.maven.tools.plugin.extractor.annotations.scanner.MojoAnnotationsScanner;
import org.apache.maven.tools.plugin.extractor.annotations.scanner.MojoAnnotationsScannerRequest;
import org.codehaus.plexus.PlexusTestCase;
import org.fest.assertions.Assertions;

import java.io.File;
import java.util.Arrays;
import java.util.Collection;
import java.util.Collections;
import java.util.Map;

import static org.assertj.core.api.Assertions.assertThat;

/**
* @author Olivier Lamy
*/
Expand All @@ -57,7 +58,7 @@ public void testReadMojoClass()

System.out.println( "mojoAnnotatedClasses:" + mojoAnnotatedClasses );

Assertions.assertThat( mojoAnnotatedClasses ).isNotNull().isNotEmpty().hasSize( 1 );
assertThat( mojoAnnotatedClasses ).isNotNull().isNotEmpty().hasSize( 1 );

MojoAnnotatedClass mojoAnnotatedClass = mojoAnnotatedClasses.values().iterator().next();

Expand All @@ -78,10 +79,10 @@ public void testReadMojoClass()
assertEquals( LifecyclePhase.PACKAGE, execute.phase() );

Collection<ComponentAnnotationContent> components = mojoAnnotatedClass.getComponents().values();
Assertions.assertThat( components ).isNotNull().isNotEmpty().hasSize( 2 );
assertThat( components ).isNotNull().isNotEmpty().hasSize( 2 );

Collection<ParameterAnnotationContent> parameters = mojoAnnotatedClass.getParameters().values();
Assertions.assertThat( parameters ).isNotNull().isNotEmpty().hasSize( 2 ).contains(
assertThat( parameters ).isNotNull().isNotEmpty().hasSize( 2 ).contains(
new ParameterAnnotationContent( "bar", null, "thebar", "coolbar", true, false, String.class.getName() ),
new ParameterAnnotationContent( "beer", null, "thebeer", "coolbeer", false, false,
String.class.getName() ) );
Expand Down

0 comments on commit d296e04

Please sign in to comment.