commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r1302002 - in /commons/proper/configuration/trunk/src/test/java/org/apache/commons/configuration: BaseNonStringProperties.java NonStringTestHolder.java TestPropertiesConfiguration.java
Date Sat, 17 Mar 2012 20:43:46 GMT
Author: sebb
Date: Sat Mar 17 20:43:46 2012
New Revision: 1302002

URL: http://svn.apache.org/viewvc?rev=1302002&view=rev
Log:
Simplify and avoid boxing

Modified:
    commons/proper/configuration/trunk/src/test/java/org/apache/commons/configuration/BaseNonStringProperties.java
    commons/proper/configuration/trunk/src/test/java/org/apache/commons/configuration/NonStringTestHolder.java
    commons/proper/configuration/trunk/src/test/java/org/apache/commons/configuration/TestPropertiesConfiguration.java

Modified: commons/proper/configuration/trunk/src/test/java/org/apache/commons/configuration/BaseNonStringProperties.java
URL: http://svn.apache.org/viewvc/commons/proper/configuration/trunk/src/test/java/org/apache/commons/configuration/BaseNonStringProperties.java?rev=1302002&r1=1302001&r2=1302002&view=diff
==============================================================================
--- commons/proper/configuration/trunk/src/test/java/org/apache/commons/configuration/BaseNonStringProperties.java
(original)
+++ commons/proper/configuration/trunk/src/test/java/org/apache/commons/configuration/BaseNonStringProperties.java
Sat Mar 17 20:43:46 2012
@@ -17,6 +17,7 @@
 package org.apache.commons.configuration;
 
 import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
 
 import org.junit.Test;
 
@@ -48,7 +49,7 @@ public abstract class BaseNonStringPrope
     public void testBooleanArrayValue() throws Exception
     {
         boolean booleanValue = conf.getBoolean("test.boolean");
-        assertEquals(true, booleanValue);
+        assertTrue(booleanValue);
         assertEquals(2, conf.getList("test.boolean.array").size());
     }
 

Modified: commons/proper/configuration/trunk/src/test/java/org/apache/commons/configuration/NonStringTestHolder.java
URL: http://svn.apache.org/viewvc/commons/proper/configuration/trunk/src/test/java/org/apache/commons/configuration/NonStringTestHolder.java?rev=1302002&r1=1302001&r2=1302002&view=diff
==============================================================================
--- commons/proper/configuration/trunk/src/test/java/org/apache/commons/configuration/NonStringTestHolder.java
(original)
+++ commons/proper/configuration/trunk/src/test/java/org/apache/commons/configuration/NonStringTestHolder.java
Sat Mar 17 20:43:46 2012
@@ -40,14 +40,14 @@ public class NonStringTestHolder
     public void testBoolean() throws Exception
     {
         boolean booleanValue = configuration.getBoolean("test.boolean");
-        Assert.assertEquals(true, booleanValue);
+        Assert.assertTrue(booleanValue);
         Assert.assertEquals(1, configuration.getList("test.boolean").size());
     }
 
     public void testBooleanDefaultValue() throws Exception
     {
         boolean booleanValue = configuration.getBoolean("test.boolean.missing", true);
-        Assert.assertEquals(true, booleanValue);
+        Assert.assertTrue(booleanValue);
 
         Boolean booleanObject = configuration.getBoolean("test.boolean.missing", new Boolean(true));
         Assert.assertEquals(new Boolean(true), booleanObject);

Modified: commons/proper/configuration/trunk/src/test/java/org/apache/commons/configuration/TestPropertiesConfiguration.java
URL: http://svn.apache.org/viewvc/commons/proper/configuration/trunk/src/test/java/org/apache/commons/configuration/TestPropertiesConfiguration.java?rev=1302002&r1=1302001&r2=1302002&view=diff
==============================================================================
--- commons/proper/configuration/trunk/src/test/java/org/apache/commons/configuration/TestPropertiesConfiguration.java
(original)
+++ commons/proper/configuration/trunk/src/test/java/org/apache/commons/configuration/TestPropertiesConfiguration.java
Sat Mar 17 20:43:46 2012
@@ -622,8 +622,8 @@ public class TestPropertiesConfiguration
     {
         ConfigurationFactory factory = new ConfigurationFactory("conf/testFactoryPropertiesInclude.xml");
         Configuration config = factory.getConfiguration();
-        assertEquals(true, config.getBoolean("deeptest"));
-        assertEquals(true, config.getBoolean("deepinclude"));
+        assertTrue(config.getBoolean("deeptest"));
+        assertTrue(config.getBoolean("deepinclude"));
         assertFalse(config.containsKey("deeptestinvalid"));
     }
 



Mime
View raw message