Clover coverage report -
Coverage timestamp: Wed Jan 31 2007 15:38:53 EST
file stats: LOC: 53   Methods: 2
NCLOC: 32   Classes: 1
 
 Source file Conditionals Statements Methods TOTAL
FileCacheLoaderConfigTest.java - 100% 100% 100%
coverage
 1    /*
 2    * JBoss, the OpenSource J2EE webOS
 3    *
 4    * Distributable under LGPL license.
 5    * See terms of license at gnu.org.
 6    */
 7    package org.jboss.cache.loader;
 8   
 9    import junit.framework.TestCase;
 10   
 11    import java.util.Properties;
 12   
 13    /**
 14    * Unit test class for FileCacheLoaderConfig
 15    *
 16    * @author <a href="mailto:galder.zamarreno@jboss.com">Galder Zamarreno</a>
 17    */
 18    public class FileCacheLoaderConfigTest extends TestCase
 19    {
 20    private FileCacheLoaderConfig fclc;
 21   
 22  1 protected void setUp() throws Exception
 23    {
 24  1 fclc = new FileCacheLoaderConfig();
 25    }
 26   
 27  1 public void testSetProperties()
 28    {
 29  1 fclc.setProperties((Properties)null);
 30  1 assertTrue(fclc.isCheckCharacterPortability());
 31  1 assertNull(fclc.getLocation());
 32   
 33  1 Properties p = new Properties();
 34  1 p.setProperty("location", "any");
 35  1 fclc.setProperties(p);
 36  1 assertTrue(fclc.isCheckCharacterPortability());
 37  1 assertEquals("any", fclc.getLocation());
 38   
 39  1 p.clear();
 40   
 41  1 p.setProperty("check.character.portability", "true");
 42  1 fclc.setProperties(p);
 43  1 assertTrue(fclc.isCheckCharacterPortability());
 44  1 assertNull(fclc.getLocation());
 45   
 46  1 p.clear();
 47   
 48  1 p.setProperty("check.character.portability", "false");
 49  1 fclc.setProperties(p);
 50  1 assertFalse(fclc.isCheckCharacterPortability());
 51  1 assertNull(fclc.getLocation());
 52    }
 53    }