1 7 package org.jboss.cache.loader; 8 9 import junit.framework.TestCase; 10 11 import java.util.Properties ; 12 13 18 public class FileCacheLoaderConfigTest extends TestCase 19 { 20 private FileCacheLoaderConfig fclc; 21 22 protected void setUp() throws Exception 23 { 24 fclc = new FileCacheLoaderConfig(); 25 } 26 27 public void testSetProperties() 28 { 29 fclc.setProperties((Properties )null); 30 assertTrue(fclc.isCheckCharacterPortability()); 31 assertNull(fclc.getLocation()); 32 33 Properties p = new Properties (); 34 p.setProperty("location", "any"); 35 fclc.setProperties(p); 36 assertTrue(fclc.isCheckCharacterPortability()); 37 assertEquals("any", fclc.getLocation()); 38 39 p.clear(); 40 41 p.setProperty("check.character.portability", "true"); 42 fclc.setProperties(p); 43 assertTrue(fclc.isCheckCharacterPortability()); 44 assertNull(fclc.getLocation()); 45 46 p.clear(); 47 48 p.setProperty("check.character.portability", "false"); 49 fclc.setProperties(p); 50 assertFalse(fclc.isCheckCharacterPortability()); 51 assertNull(fclc.getLocation()); 52 } 53 } 54 | Popular Tags |