KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jboss > cache > passivation > PassivationToLocalDelegatingCacheLoaderTest


1 package org.jboss.cache.passivation;
2
3 import junit.framework.Test;
4 import junit.framework.TestSuite;
5 import org.jboss.cache.CacheImpl;
6 import org.jboss.cache.config.Configuration;
7 import org.jboss.cache.loader.DelegatingCacheLoader;
8 import org.jboss.cache.loader.LocalDelegatingCacheLoader;
9
10 /**
11  * Runs a test against using delegated cache loader
12  *
13  * @author <a HREF="mailto:{hmesha@novell.com}">{Hany Mesha}</a>
14  * @version $Id: PassivationToLocalDelegatingCacheLoaderTest.java,v 1.8 2006/12/30 17:49:59 msurtani Exp $
15  */

16 public class PassivationToLocalDelegatingCacheLoaderTest extends PassivationTestsBase
17 {
18    CacheImpl delegating_cache;
19    DelegatingCacheLoader cache_loader;
20
21
22    protected void configureCache() throws Exception JavaDoc
23    {
24       delegating_cache = new CacheImpl();
25       delegating_cache.getConfiguration().setCacheMode(Configuration.CacheMode.LOCAL);
26       delegating_cache.create();
27       delegating_cache.start();
28       cache_loader = new LocalDelegatingCacheLoader(delegating_cache);
29       // configure first ...
30
cache.getConfiguration().setCacheLoaderConfig(getCacheLoaderConfig("", "org.jboss.cache.loader.LocalDelegatingCacheLoader", "", false, false));
31
32       cache.setCacheLoader(cache_loader);
33    }
34
35    protected void tearDown() throws Exception JavaDoc
36    {
37       super.tearDown();
38       delegating_cache.stop();
39       delegating_cache.destroy();
40    }
41
42    public void testLoadAndStore() throws Exception JavaDoc
43    {
44       //TODO intentional overload since this test does not pass
45
//http://jira.jboss.com/jira/browse/JBCACHE-851
46
}
47
48
49    public static Test suite()
50    {
51       return new TestSuite(PassivationToLocalDelegatingCacheLoaderTest.class);
52    }
53
54
55    public static void main(String JavaDoc[] args)
56    {
57       junit.textui.TestRunner.run(suite());
58    }
59
60 }
61
Popular Tags