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