[jboss-cvs] JBossCache/tests/functional/org/jboss/cache/aop/loader ...

Manik Surtani msurtani at jboss.com
Thu Jul 20 04:05:17 EDT 2006


  User: msurtani
  Date: 06/07/20 04:05:17

  Modified:    tests/functional/org/jboss/cache/aop/loader    
                        CacheLoaderTestsBase.java
                        FileCacheLoaderAopTest.java
                        FileCacheLoaderObjectGraphAopTest.java
                        ObjectGraphTestsBase.java
  Log:
  Fixed some broken UTs to use the new xml parsers, cache factories, etc.
  
  Revision  Changes    Path
  1.10      +6 -3      JBossCache/tests/functional/org/jboss/cache/aop/loader/CacheLoaderTestsBase.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: CacheLoaderTestsBase.java
  ===================================================================
  RCS file: /cvsroot/jboss/JBossCache/tests/functional/org/jboss/cache/aop/loader/CacheLoaderTestsBase.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -b -r1.9 -r1.10
  --- CacheLoaderTestsBase.java	9 Apr 2006 12:33:49 -0000	1.9
  +++ CacheLoaderTestsBase.java	20 Jul 2006 08:05:17 -0000	1.10
  @@ -3,6 +3,7 @@
   import junit.framework.Test;
   import junit.framework.TestSuite;
   import org.jboss.cache.Fqn;
  +import org.jboss.cache.config.Configuration;
   import org.jboss.cache.aop.PojoCache;
   import org.jboss.cache.aop.test.Person;
   import org.jboss.cache.loader.CacheLoader;
  @@ -13,7 +14,7 @@
    * Commons tests for all CacheLoaders. Aop version.
    *
    * @author bwang
  - * @version $Id: CacheLoaderTestsBase.java,v 1.9 2006/04/09 12:33:49 bwang Exp $
  + * @version $Id: CacheLoaderTestsBase.java,v 1.10 2006/07/20 08:05:17 msurtani Exp $
    */
   abstract public class CacheLoaderTestsBase extends AbstractCacheLoaderTestBase {
      PojoCache cache;
  @@ -24,9 +25,11 @@
      protected void setUp() throws Exception {
         super.setUp();
         cache = new PojoCache();
  -      cache.setCacheMode("local");
  +      Configuration c = new Configuration();
  +      cache.setConfiguration(c);
  +      c.setCacheMode("local");
         configureCache();
  -      cache.setTransactionManagerLookupClass("org.jboss.cache.DummyTransactionManagerLookup");
  +      c.setTransactionManagerLookupClass("org.jboss.cache.DummyTransactionManagerLookup");
         cache.createService();
         cache.startService();
         loader = cache.getCacheLoader();
  
  
  
  1.8       +1 -1      JBossCache/tests/functional/org/jboss/cache/aop/loader/FileCacheLoaderAopTest.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: FileCacheLoaderAopTest.java
  ===================================================================
  RCS file: /cvsroot/jboss/JBossCache/tests/functional/org/jboss/cache/aop/loader/FileCacheLoaderAopTest.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -b -r1.7 -r1.8
  --- FileCacheLoaderAopTest.java	20 Jul 2006 06:04:56 -0000	1.7
  +++ FileCacheLoaderAopTest.java	20 Jul 2006 08:05:17 -0000	1.8
  @@ -33,7 +33,7 @@
   
      protected void configureCache() throws Exception {
          String tmp_location = System.getProperty("java.io.tmpdir", "c:\\tmp");
  -       cache.setCacheLoaderConfiguration(getSingleCacheLoaderConfig("", "org.jboss.cache.loader.FileCacheLoader", "", false, true, false));
  +       cache.getConfiguration().setCacheLoaderConfiguration(getSingleCacheLoaderConfig("", "org.jboss.cache.loader.FileCacheLoader", "", false, true, false));
   //       cache.setCacheLoaderConfiguration(getCacheLoaderConfiguration(tmp_location));
      }
   
  
  
  
  1.7       +1 -1      JBossCache/tests/functional/org/jboss/cache/aop/loader/FileCacheLoaderObjectGraphAopTest.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: FileCacheLoaderObjectGraphAopTest.java
  ===================================================================
  RCS file: /cvsroot/jboss/JBossCache/tests/functional/org/jboss/cache/aop/loader/FileCacheLoaderObjectGraphAopTest.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -b -r1.6 -r1.7
  --- FileCacheLoaderObjectGraphAopTest.java	20 Jul 2006 06:04:56 -0000	1.6
  +++ FileCacheLoaderObjectGraphAopTest.java	20 Jul 2006 08:05:17 -0000	1.7
  @@ -10,7 +10,7 @@
   public class FileCacheLoaderObjectGraphAopTest extends ObjectGraphTestsBase {
      protected void configureCache() throws Exception {
         String tmp_location = System.getProperty("java.io.tmpdir", "c:\\tmp");
  -      cache.setCacheLoaderConfiguration(getSingleCacheLoaderConfig("", "org.jboss.cache.loader.FileCacheLoader", "", false, true, false));
  +      cache.getConfiguration().setCacheLoaderConfiguration(getSingleCacheLoaderConfig("", "org.jboss.cache.loader.FileCacheLoader", "", false, true, false));
   //      cache.setCacheLoaderConfiguration(getCacheLoaderConfiguration(tmp_location));
      }
   
  
  
  
  1.5       +6 -3      JBossCache/tests/functional/org/jboss/cache/aop/loader/ObjectGraphTestsBase.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: ObjectGraphTestsBase.java
  ===================================================================
  RCS file: /cvsroot/jboss/JBossCache/tests/functional/org/jboss/cache/aop/loader/ObjectGraphTestsBase.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -b -r1.4 -r1.5
  --- ObjectGraphTestsBase.java	19 Jul 2006 08:29:19 -0000	1.4
  +++ ObjectGraphTestsBase.java	20 Jul 2006 08:05:17 -0000	1.5
  @@ -5,6 +5,7 @@
   import org.apache.commons.logging.Log;
   import org.apache.commons.logging.LogFactory;
   import org.jboss.cache.Fqn;
  +import org.jboss.cache.config.Configuration;
   import org.jboss.cache.loader.CacheLoader;
   import org.jboss.cache.aop.PojoCache;
   import org.jboss.cache.aop.test.Address;
  @@ -16,7 +17,7 @@
    * Commons tests for all CacheLoaders. Aop version.
    *
    * @author bwang
  - * @version $Id: ObjectGraphTestsBase.java,v 1.4 2006/07/19 08:29:19 msurtani Exp $
  + * @version $Id: ObjectGraphTestsBase.java,v 1.5 2006/07/20 08:05:17 msurtani Exp $
    */
   abstract public class ObjectGraphTestsBase extends AbstractCacheLoaderTestBase {
      Log log=LogFactory.getLog(ObjectGraphTestsBase.class);
  @@ -28,9 +29,11 @@
      protected void setUp() throws Exception {
         super.setUp();
         cache = new PojoCache();
  -      cache.setCacheMode("local");
  +      Configuration c = new Configuration();
  +      cache.setConfiguration(c);
  +      c.setCacheMode("local");
         configureCache();
  -      cache.setTransactionManagerLookupClass("org.jboss.cache.DummyTransactionManagerLookup");
  +      c.setTransactionManagerLookupClass("org.jboss.cache.DummyTransactionManagerLookup");
         cache.createService();
         cache.startService();
         loader = cache.getCacheLoader();
  
  
  



More information about the jboss-cvs-commits mailing list