You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by el...@apache.org on 2025/02/26 23:23:29 UTC

(maven-project-info-reports-plugin) branch master updated: Improve assert usages (#109)

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

elharo pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/maven-project-info-reports-plugin.git


The following commit(s) were added to refs/heads/master by this push:
     new adc360a  Improve assert usages (#109)
adc360a is described below

commit adc360a0ab1660947dc9d00bff463e85778f1459
Author: Elliotte Rusty Harold <el...@users.noreply.github.com>
AuthorDate: Wed Feb 26 23:23:25 2025 +0000

    Improve assert usages (#109)
    
    * Improve asserts
---
 .../org/apache/maven/report/projectinfo/DependenciesReportTest.java   | 4 ++--
 .../maven/report/projectinfo/DependencyManagementReportTest.java      | 4 ++--
 .../org/apache/maven/report/projectinfo/MailingListsReportTest.java   | 2 +-
 3 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/src/test/java/org/apache/maven/report/projectinfo/DependenciesReportTest.java b/src/test/java/org/apache/maven/report/projectinfo/DependenciesReportTest.java
index 742f6b5..97de835 100644
--- a/src/test/java/org/apache/maven/report/projectinfo/DependenciesReportTest.java
+++ b/src/test/java/org/apache/maven/report/projectinfo/DependenciesReportTest.java
@@ -66,9 +66,9 @@ public class DependenciesReportTest extends AbstractProjectInfoTestCase {
         // Test the tables
         WebTable[] webTables = response.getTables();
         // One table with listing and one table per artifact popup
-        assertEquals(webTables.length, 3);
+        assertEquals(3, webTables.length);
 
-        assertEquals(webTables[0].getColumnCount(), 5);
+        assertEquals(5, webTables[0].getColumnCount());
         assertEquals(
                 webTables[0].getRowCount(),
                 1 + getTestMavenProject().getDependencies().size());
diff --git a/src/test/java/org/apache/maven/report/projectinfo/DependencyManagementReportTest.java b/src/test/java/org/apache/maven/report/projectinfo/DependencyManagementReportTest.java
index 2a3bc62..821610d 100644
--- a/src/test/java/org/apache/maven/report/projectinfo/DependencyManagementReportTest.java
+++ b/src/test/java/org/apache/maven/report/projectinfo/DependencyManagementReportTest.java
@@ -67,9 +67,9 @@ public class DependencyManagementReportTest extends AbstractProjectInfoTestCase
 
         // Test the tables
         WebTable[] webTables = response.getTables();
-        assertEquals(webTables.length, 1);
+        assertEquals(1, webTables.length);
 
-        assertEquals(webTables[0].getColumnCount(), 5);
+        assertEquals(5, webTables[0].getColumnCount());
         assertEquals(
                 webTables[0].getRowCount(),
                 1
diff --git a/src/test/java/org/apache/maven/report/projectinfo/MailingListsReportTest.java b/src/test/java/org/apache/maven/report/projectinfo/MailingListsReportTest.java
index 61a63e5..19d1d16 100644
--- a/src/test/java/org/apache/maven/report/projectinfo/MailingListsReportTest.java
+++ b/src/test/java/org/apache/maven/report/projectinfo/MailingListsReportTest.java
@@ -79,7 +79,7 @@ public class MailingListsReportTest extends AbstractProjectInfoTestCase {
         assertEquals("MAILTO:test-subscribe2@maven.apache.org", subscribeLinks[1].getAttribute("href"));
         String unsubscribe = getString("report.mailing-lists.column.unsubscribe");
         WebLink[] unsubscribeLinks = response.getMatchingLinks(WebLink.MATCH_CONTAINED_TEXT, unsubscribe);
-        assertTrue(unsubscribeLinks.length == 1);
+        assertEquals(1, unsubscribeLinks.length);
         assertEquals("https://example.com/unsubscribe", unsubscribeLinks[0].getAttribute("href"));
     }