You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by se...@apache.org on 2014/04/08 11:58:12 UTC
svn commit: r1585672 -
/commons/proper/jcs/trunk/src/test/org/apache/commons/jcs/engine/SystemPropertyUsageUnitTest.java
Author: sebb
Date: Tue Apr 8 09:58:12 2014
New Revision: 1585672
URL: http://svn.apache.org/r1585672
Log:
Simplify; use shared common value
Modified:
commons/proper/jcs/trunk/src/test/org/apache/commons/jcs/engine/SystemPropertyUsageUnitTest.java
Modified: commons/proper/jcs/trunk/src/test/org/apache/commons/jcs/engine/SystemPropertyUsageUnitTest.java
URL: http://svn.apache.org/viewvc/commons/proper/jcs/trunk/src/test/org/apache/commons/jcs/engine/SystemPropertyUsageUnitTest.java?rev=1585672&r1=1585671&r2=1585672&view=diff
==============================================================================
--- commons/proper/jcs/trunk/src/test/org/apache/commons/jcs/engine/SystemPropertyUsageUnitTest.java (original)
+++ commons/proper/jcs/trunk/src/test/org/apache/commons/jcs/engine/SystemPropertyUsageUnitTest.java Tue Apr 8 09:58:12 2014
@@ -43,14 +43,15 @@ public class SystemPropertyUsageUnitTest
public void testSystemPropertyUsage()
throws Exception
{
- System.getProperties().setProperty( "jcs.default.cacheattributes.MaxObjects", "6789" );
+ final int testValue = 6789;
+
+ System.getProperties().setProperty( "jcs.default.cacheattributes.MaxObjects", String.valueOf(testValue) );
JCS.setConfigFilename( "/TestSystemPropertyUsage.ccf" );
CacheAccess<String, String> jcs = JCS.getInstance( "someCacheNotInFile" );
- assertEquals( "System property value is not reflected", jcs.getCacheAttributes().getMaxObjects(), Integer
- .parseInt( "6789" ) );
+ assertEquals( "System property value is not reflected", testValue, jcs.getCacheAttributes().getMaxObjects());
}