Author: asmuts
Date: Fri Feb 10 09:05:41 2006
New Revision: 376764
URL: http://svn.apache.org/viewcvs?rev=376764&view=rev
Log:
cleaning
Modified:
jakarta/jcs/trunk/src/test/org/apache/jcs/access/SystemPropetyUnitTest.java
jakarta/jcs/trunk/src/test/org/apache/jcs/access/TestCacheAccess.java
Modified:
jakarta/jcs/trunk/src/test/org/apache/jcs/access/SystemPropetyUnitTest.java
URL:
http://svn.apache.org/viewcvs/jakarta/jcs/trunk/src/test/org/apache/jcs/access/SystemPropetyUnitTest.java?rev=376764&r1=376763&r2=376764&view=diff
==============================================================================
--- jakarta/jcs/trunk/src/test/org/apache/jcs/access/SystemPropetyUnitTest.java
(original)
+++ jakarta/jcs/trunk/src/test/org/apache/jcs/access/SystemPropetyUnitTest.java
Fri Feb 10 09:05:41 2006
@@ -1,16 +1,15 @@
package org.apache.jcs.access;
+import junit.framework.TestCase;
+
import org.apache.jcs.JCS;
-import org.apache.jcs.engine.behavior.ICompositeCacheAttributes;
import org.apache.jcs.engine.control.CompositeCacheManager;
-import junit.framework.TestCase;
-
/**
+ * This test is for the system property usage in configuration values.
*
- *
* @author Aaron Smuts
- *
+ *
*/
public class SystemPropetyUnitTest
extends TestCase
@@ -18,40 +17,47 @@
/**
* Verify that we use a system property for a ${FOO} string in a value.
- * @throws Exception
- *
+ *
+ * @throws Exception
+ *
*/
- public void testSystemPropertyInValueDelimeter() throws Exception
+ public void testSystemPropertyInValueDelimeter()
+ throws Exception
{
-
+
int maxMemory = 1234;
System.getProperties().setProperty( "MY_SYSTEM_PROPERTY_DISK_DIR",
"system_set" );
System.getProperties().setProperty( "MY_SYSTEM_PROPERTY_MAX_SIZE",
String.valueOf( maxMemory ) );
-
+
JCS.setConfigFilename( "/TestSystemProperties.ccf" );
-
+
JCS cache = JCS.getInstance( "test1" );
- assertEquals( "We should have used the system property for the memory
size", maxMemory, cache.getCacheAttributes().getMaxObjects() );
-
+ assertEquals( "We should have used the system property for the memory
size", maxMemory, cache
+ .getCacheAttributes().getMaxObjects() );
+
}
-
+
/**
- * Verify that we use a system property for a ${FOO} string in a value.
We define a propety in the
- * cache.ccf file, but we do not have it as a system property. The
default value should be used, if one exists.
- * @throws Exception
- *
+ * Verify that we use a system property for a ${FOO} string in a value. We
+ * define a propety in the cache.ccf file, but we do not have it as a
system
+ * property. The default value should be used, if one exists.
+ *
+ * @throws Exception
+ *
*/
- public void testSystemPropertyMissingInValueDelimeter() throws Exception
+ public void testSystemPropertyMissingInValueDelimeter()
+ throws Exception
{
System.getProperties().setProperty( "MY_SYSTEM_PROPERTY_DISK_DIR",
"system_set" );
-
+
CompositeCacheManager mgr =
CompositeCacheManager.getUnconfiguredInstance();
mgr.configure( "/TestSystemProperties.ccf" );
-
+
JCS cache = JCS.getInstance( "missing" );
// TODO check against the actual default def
- assertEquals( "We should have used the default property for the memory
size", 100, cache.getCacheAttributes().getMaxObjects() );
-
+ assertEquals( "We should have used the default property for the memory
size", 100, cache.getCacheAttributes()
+ .getMaxObjects() );
+
}
-
+
}
Modified: jakarta/jcs/trunk/src/test/org/apache/jcs/access/TestCacheAccess.java
URL:
http://svn.apache.org/viewcvs/jakarta/jcs/trunk/src/test/org/apache/jcs/access/TestCacheAccess.java?rev=376764&r1=376763&r2=376764&view=diff
==============================================================================
--- jakarta/jcs/trunk/src/test/org/apache/jcs/access/TestCacheAccess.java
(original)
+++ jakarta/jcs/trunk/src/test/org/apache/jcs/access/TestCacheAccess.java Fri
Feb 10 09:05:41 2006
@@ -56,7 +56,7 @@
}
/**
- * @param ccfFileName
+ * @param regionName the name of the region.
*/
public TestCacheAccess( String regionName )
{
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]