[jboss-cvs] JBossCache/tests/functional/org/jboss/cache/loader ...
Galder Zamarreno
galder.zamarreno at jboss.com
Thu Nov 23 11:07:38 EST 2006
User: gzamarreno
Date: 06/11/23 11:07:38
Added: tests/functional/org/jboss/cache/loader
FileCacheLoaderConfigTest.java
Log:
[JBCACHE-644] Character portability checks can be disabled now with added flag. Documentation updated. Regex patterns made static final.
Revision Changes Path
1.1 date: 2006/11/23 16:07:38; author: gzamarreno; state: Exp;JBossCache/tests/functional/org/jboss/cache/loader/FileCacheLoaderConfigTest.java
Index: FileCacheLoaderConfigTest.java
===================================================================
/*
* JBoss, the OpenSource J2EE webOS
*
* Distributable under LGPL license.
* See terms of license at gnu.org.
*/
package org.jboss.cache.loader;
import junit.framework.TestCase;
import java.util.Properties;
/**
* Unit test class for FileCacheLoaderConfig
*
* @author <a href="mailto:galder.zamarreno at jboss.com">Galder Zamarreno</a>
*/
public class FileCacheLoaderConfigTest extends TestCase
{
private FileCacheLoaderConfig fclc;
protected void setUp() throws Exception
{
fclc = new FileCacheLoaderConfig();
}
public void testSetProperties()
{
fclc.setProperties((Properties)null);
assertTrue(fclc.isCheckCharacterPortability());
assertNull(fclc.getLocation());
Properties p = new Properties();
p.setProperty("location", "any");
fclc.setProperties(p);
assertTrue(fclc.isCheckCharacterPortability());
assertEquals("any", fclc.getLocation());
p.clear();
p.setProperty("check.character.portability", "true");
fclc.setProperties(p);
assertTrue(fclc.isCheckCharacterPortability());
assertNull(fclc.getLocation());
p.clear();
p.setProperty("check.character.portability", "false");
fclc.setProperties(p);
assertFalse(fclc.isCheckCharacterPortability());
assertNull(fclc.getLocation());
}
}
More information about the jboss-cvs-commits
mailing list