garydgregory commented on code in PR #286:
URL: https://github.com/apache/commons-beanutils/pull/286#discussion_r1758881884


##########
src/test/java/org/apache/commons/beanutils2/bugs/Jira422Test.java:
##########
@@ -54,11 +54,11 @@ public static void assumeSupportsIndexedLists() throws 
IntrospectionException {
         final BeanInfo beanInfo = Introspector.getBeanInfo(RootBean.class);
         for (final PropertyDescriptor pd : beanInfo.getPropertyDescriptors()) {
             if (pd.getName().equals("file")) {
-                Assume.assumeTrue("BEANUTILS-492: IndexedPropertyDescriptor no 
longer supported for java.util.List", pd instanceof IndexedPropertyDescriptor);
+                assumeTrue(pd instanceof IndexedPropertyDescriptor, 
"BEANUTILS-492: IndexedPropertyDescriptor no longer supported for 
java.util.List");

Review Comment:
   In the future, you can use `assertInstanceOf()`.



##########
src/test/java/org/apache/commons/beanutils2/converters/URLConverterTest.java:
##########
@@ -44,8 +44,8 @@ public void testSimpleConversion() {
                 
"http://notreal.apache.org/test/file.xml#%E8%AE%A1%E7%AE%97%E6%9C%BA%E5%9B%BE%E5%BD%A2%E5%AD%A6";
 };
 
         for (final String urlString : input) {
-            assertEquals("from String to URL", urlString, 
converter.convert(URL.class, urlString).toString());
-            assertEquals("from String to null type", urlString, 
converter.convert(null, urlString).toString());
+            assertEquals(urlString, converter.convert(URL.class, 
urlString).toString(), "from String to URL");
+            assertEquals(urlString, converter.convert(null, 
urlString).toString(),"from String to null type");

Review Comment:
   In the future, make sure you have a space after a comma. I'll just reformat 
post merge.



##########
src/test/java/org/apache/commons/beanutils2/converters/MemoryTest.java:
##########
@@ -116,7 +116,7 @@ public void testComponentRegistersCustomConverter() throws 
Exception {
                 // verify that this new object does implement the Converter 
type
                 // despite being loaded via a classloader different from the 
one
                 // that loaded the Converter class.
-                assertTrue("Converter loader via child does not implement 
parent type", newFloatConverter instanceof Converter);
+                assertTrue(newFloatConverter instanceof Converter, "Converter 
loader via child does not implement parent type");

Review Comment:
   In the future, you can use `assertInstanceOf()`.



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