You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by br...@apache.org on 2015/11/03 22:10:50 UTC
svn commit: r1712415 - in
/commons/sandbox/beanutils2/trunk/src/test/java/org/apache/commons/beanutils2:
BeanUtilsTest.java InvokeTestCase.java
Author: britter
Date: Tue Nov 3 21:10:50 2015
New Revision: 1712415
URL: http://svn.apache.org/viewvc?rev=1712415&view=rev
Log:
No need to create a new Boolaen instance
Modified:
commons/sandbox/beanutils2/trunk/src/test/java/org/apache/commons/beanutils2/BeanUtilsTest.java
commons/sandbox/beanutils2/trunk/src/test/java/org/apache/commons/beanutils2/InvokeTestCase.java
Modified: commons/sandbox/beanutils2/trunk/src/test/java/org/apache/commons/beanutils2/BeanUtilsTest.java
URL: http://svn.apache.org/viewvc/commons/sandbox/beanutils2/trunk/src/test/java/org/apache/commons/beanutils2/BeanUtilsTest.java?rev=1712415&r1=1712414&r2=1712415&view=diff
==============================================================================
--- commons/sandbox/beanutils2/trunk/src/test/java/org/apache/commons/beanutils2/BeanUtilsTest.java (original)
+++ commons/sandbox/beanutils2/trunk/src/test/java/org/apache/commons/beanutils2/BeanUtilsTest.java Tue Nov 3 21:10:50 2015
@@ -50,7 +50,7 @@ public class BeanUtilsTest {
@Test
public void onBeanBooleanWrapper() {
- assertNotNull(on(new Boolean(true)));
+ assertNotNull(on(Boolean.TRUE));
}
@Test
Modified: commons/sandbox/beanutils2/trunk/src/test/java/org/apache/commons/beanutils2/InvokeTestCase.java
URL: http://svn.apache.org/viewvc/commons/sandbox/beanutils2/trunk/src/test/java/org/apache/commons/beanutils2/InvokeTestCase.java?rev=1712415&r1=1712414&r2=1712415&view=diff
==============================================================================
--- commons/sandbox/beanutils2/trunk/src/test/java/org/apache/commons/beanutils2/InvokeTestCase.java (original)
+++ commons/sandbox/beanutils2/trunk/src/test/java/org/apache/commons/beanutils2/InvokeTestCase.java Tue Nov 3 21:10:50 2015
@@ -69,7 +69,7 @@ public class InvokeTestCase {
@Test
public void invokeMethodSetBooleanPropertyWithWrapper()
throws Exception {
- on(testBean).invoke("setBooleanProperty").with(argument(new Boolean(false)));
+ on(testBean).invoke("setBooleanProperty").with(argument(Boolean.FALSE));
assertFalse(testBean.getBooleanProperty());
}
@@ -127,14 +127,14 @@ public class InvokeTestCase {
@Test(expected = NoSuchBeanMethodException.class)
public void invokeExactMethodSetBooleanPropertyWithWrapper()
throws Exception {
- on(testBean).invokeExact("setBooleanProperty").with(argument(new Boolean(false)));
+ on(testBean).invokeExact("setBooleanProperty").with(argument(Boolean.FALSE));
}
@Test
public void invokeExactMethodSetBooleanPropertyWithWrapperAsPrimitive()
throws Exception {
on(testBean).invokeExact("setBooleanProperty").with(argument(boolean.class,
- new Boolean(false)));
+ Boolean.FALSE));
assertFalse(testBean.getBooleanProperty());
}