garydgregory commented on a change in pull request #45:
URL: https://github.com/apache/commons-validator/pull/45#discussion_r505572171



##########
File path: 
src/test/java/org/apache/commons/validator/routines/DomainValidatorStartupTest.java
##########
@@ -35,24 +39,52 @@
 @RunWith( ClassLoaderPerTestRunner.class )
 public class DomainValidatorStartupTest {
 
-    @Test(expected = IllegalArgumentException.class)
+    @Test
     public void testUpdateBaseArrayCC() {
-        DomainValidator.updateTLDOverride(ArrayType.COUNTRY_CODE_RO, new 
String[]{"com"});
+        // FIXME Simplification once upgraded to Java 1.8
+        final ThrowingRunnable testMethod = new ThrowingRunnable() {
+            public void run() {
+                DomainValidator.updateTLDOverride(ArrayType.COUNTRY_CODE_RO, 
new String[]{"com"});
+            }
+        };
+        final IllegalArgumentException thrown = 
assertThrows(IllegalArgumentException.class, testMethod);
+        assertThat(thrown.getMessage(), is(equalTo("Cannot update the table: 
COUNTRY_CODE_RO")));

Review comment:
       Same comment as in the Apache Commons Collections PR. Let's skip 
asserting the exception messages.




----------------------------------------------------------------
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.

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


Reply via email to