Clover coverage report -
Coverage timestamp: Wed Jan 31 2007 15:38:53 EST
file stats: LOC: 52   Methods: 3
NCLOC: 31   Classes: 1
 
 Source file Conditionals Statements Methods TOTAL
C3p0JDBCCacheLoaderTest.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 org.apache.commons.logging.Log;
 10    import org.apache.commons.logging.LogFactory;
 11   
 12    import java.util.Properties;
 13   
 14    import junit.framework.Test;
 15    import junit.framework.TestSuite;
 16   
 17    /**
 18    * Unit test that runs the the tests defined JDBCCacheLoaderTest using a standalone
 19    * connection pool factory based on c3p0 library.
 20    *
 21    * @author <a href="mailto:galder.zamarreno@jboss.com">Galder Zamarreno</a>
 22    */
 23    public class C3p0JDBCCacheLoaderTest extends JDBCCacheLoaderTest
 24    {
 25    private static final Log log = LogFactory.getLog(C3p0JDBCCacheLoaderTest.class);
 26    private static final String CF_CLASS = "org.jboss.cache.loader.C3p0ConnectionFactory";
 27   
 28  60 public C3p0JDBCCacheLoaderTest(String name)
 29    {
 30  60 super(name);
 31    }
 32   
 33  60 protected void configureCache() throws Exception
 34    {
 35  60 Properties prop = getProperties();
 36   
 37  60 String props = "cache.jdbc.driver =" + prop.getProperty("cache.jdbc.driver") + "\n" +
 38    "cache.jdbc.url=" + prop.getProperty("cache.jdbc.url") + "\n" +
 39    "cache.jdbc.user=" + prop.getProperty("cache.jdbc.user") + "\n" +
 40    "cache.jdbc.password=" + prop.getProperty("cache.jdbc.password") + "\n" +
 41    "cache.jdbc.node.type=" + prop.getProperty("cache.jdbc.node.type") + "\n" +
 42    "cache.jdbc.connection.factory=" + CF_CLASS;
 43   
 44  60 cache.getConfiguration().setCacheLoaderConfig(getSingleCacheLoaderConfig("",
 45    "org.jboss.cache.loader.JDBCCacheLoader", props, false, true, false));
 46    }
 47   
 48  1 public static Test suite()
 49    {
 50  1 return new TestSuite(C3p0JDBCCacheLoaderTest.class);
 51    }
 52    }