aherbert commented on code in PR #216:
URL: https://github.com/apache/commons-math/pull/216#discussion_r1001138690


##########
commons-math-neuralnet/src/test/java/org/apache/commons/math4/neuralnet/twod/NeuronSquareMesh2DTest.java:
##########
@@ -36,32 +36,37 @@
 import org.apache.commons.math4.neuralnet.Neuron;
 import org.apache.commons.math4.neuralnet.SquareNeighbourhood;
 
+import static org.junit.jupiter.api.Assertions.assertThrows;
+
 /**
  * Tests for {@link NeuronSquareMesh2D} and {@link Network} functionality for
  * a two-dimensional network.
  */
 public class NeuronSquareMesh2DTest {
+
     private final UniformRandomProvider rng = 
RandomSource.SPLIT_MIX_64.create();
     private final FeatureInitializer init = 
FeatureInitializerFactory.uniform(rng, 0, 2);
 
-    @Test(expected = IllegalArgumentException.class)
+    @Test
     public void testMinimalNetworkSize1() {
         final FeatureInitializer[] initArray = {init};
 
-        new NeuronSquareMesh2D(1, false,
-                               2, false,
-                               SquareNeighbourhood.VON_NEUMANN,
-                               initArray);
+        assertThrows(IllegalArgumentException.class, () ->
+                new NeuronSquareMesh2D(1, false,

Review Comment:
   In the case where the style has aligned trailing arguments can you try and 
keep to the formatting, e.g.
   ```Java
   //                     | aligned here
   new NeuronSquareMesh2D(1, false,
                          2, false,
                          SquareNeighbourhood.VON_NEUMANN,
                          initArray));
   ```
   
   This alignment aids readability (for the original content creator, opinions 
may differ) and is used across the codebase. When not used then trailing lines 
are either 4 or 8 space indent.
   



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to