KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jboss > cache > loader > LocalDelegatingCacheLoaderTest


1 package org.jboss.cache.loader;
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
8 /**
9  * Created by IntelliJ IDEA.
10  * User: bela
11  * Date: Jun 9, 2004
12  * Time: 9:05:19 AM
13  */

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