Skip to content

Commit

Permalink
Improve assert usages (#109)
Browse files Browse the repository at this point in the history
* Improve asserts
  • Loading branch information
elharo authored Feb 26, 2025
1 parent 59f0806 commit adc360a
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,9 @@ public void testReport() throws Exception {
// 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());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,9 @@ public void testReport() throws Exception {

// 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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ public void testReport() throws Exception {
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"));
}

Expand Down

0 comments on commit adc360a

Please sign in to comment.