You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by sl...@apache.org on 2022/01/10 16:24:52 UTC

[maven-plugin-tools] 08/11: [MPLUGIN-387] Switch from fest-assert to AssertJ 2.9.1

This is an automated email from the ASF dual-hosted git repository.

slachiewicz pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/maven-plugin-tools.git

commit d296e04045026716f1fba5d296a0dd4330cc7f92
Author: Sylwester Lachiewicz <sl...@apache.org>
AuthorDate: Mon Jan 10 02:30:14 2022 +0100

    [MPLUGIN-387] Switch from fest-assert to AssertJ 2.9.1
---
 maven-plugin-tools-annotations/pom.xml                           | 6 +++---
 .../plugin/extractor/annotations/TestAnnotationsReader.java      | 9 +++++----
 2 files changed, 8 insertions(+), 7 deletions(-)

diff --git a/maven-plugin-tools-annotations/pom.xml b/maven-plugin-tools-annotations/pom.xml
index 73b343d..34c2db2 100644
--- a/maven-plugin-tools-annotations/pom.xml
+++ b/maven-plugin-tools-annotations/pom.xml
@@ -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>
diff --git a/maven-plugin-tools-annotations/src/test/java/org/apache/maven/tools/plugin/extractor/annotations/TestAnnotationsReader.java b/maven-plugin-tools-annotations/src/test/java/org/apache/maven/tools/plugin/extractor/annotations/TestAnnotationsReader.java
index b7702df..1f43e56 100644
--- a/maven-plugin-tools-annotations/src/test/java/org/apache/maven/tools/plugin/extractor/annotations/TestAnnotationsReader.java
+++ b/maven-plugin-tools-annotations/src/test/java/org/apache/maven/tools/plugin/extractor/annotations/TestAnnotationsReader.java
@@ -29,7 +29,6 @@ import org.apache.maven.tools.plugin.extractor.annotations.scanner.MojoAnnotated
 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;
@@ -37,6 +36,8 @@ import java.util.Collection;
 import java.util.Collections;
 import java.util.Map;
 
+import static org.assertj.core.api.Assertions.assertThat;
+
 /**
  * @author Olivier Lamy
  */
@@ -57,7 +58,7 @@ public class TestAnnotationsReader
 
         System.out.println( "mojoAnnotatedClasses:" + mojoAnnotatedClasses );
 
-        Assertions.assertThat( mojoAnnotatedClasses ).isNotNull().isNotEmpty().hasSize( 1 );
+        assertThat( mojoAnnotatedClasses ).isNotNull().isNotEmpty().hasSize( 1 );
 
         MojoAnnotatedClass mojoAnnotatedClass = mojoAnnotatedClasses.values().iterator().next();
 
@@ -78,10 +79,10 @@ public class TestAnnotationsReader
         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() ) );