You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by GitBox <gi...@apache.org> on 2022/03/05 11:49:51 UTC

[GitHub] [commons-collections] garydgregory commented on a change in pull request #287: COLLECTIONS-777 JUnit v5

garydgregory commented on a change in pull request #287:
URL: https://github.com/apache/commons-collections/pull/287#discussion_r820088257



##########
File path: src/test/java/org/apache/commons/collections4/ClosureUtilsTest.java
##########
@@ -138,18 +135,13 @@ public void testWhileClosure() {
         ClosureUtils.whileClosure(PredicateUtils.uniquePredicate(), cmd).execute(null);
         assertEquals(1, cmd.count);
 
-        try {
-            ClosureUtils.whileClosure(null, ClosureUtils.nopClosure());
-            fail();
-        } catch (final NullPointerException ex) {}
-        try {
-            ClosureUtils.whileClosure(FalsePredicate.falsePredicate(), null);
-            fail();
-        } catch (final NullPointerException ex) {}
-        try {
-            ClosureUtils.whileClosure(null, null);
-            fail();
-        } catch (final NullPointerException ex) {}
+        assertAll(
+                () -> assertThrows(NullPointerException.class, () -> ClosureUtils.whileClosure(null, ClosureUtils.nopClosure())),
+

Review comment:
       Why are there extra blank lines between arguments? We don't do this for other method calls.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@commons.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org