KickJava   Java API By Example, From Geeks To Geeks.

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


1 package org.jboss.cache.tests.loader;
2
3 import junit.framework.Test;
4 import junit.framework.TestSuite;
5 import org.jboss.cache.TreeCache;
6 import org.jboss.cache.loader.DelegatingCacheLoader;
7 import org.jboss.cache.loader.LocalDelegatingCacheLoader;
8
9 /**
10  * Created by IntelliJ IDEA.
11  * User: bela
12  * Date: Jun 9, 2004
13  * Time: 9:05:19 AM
14  */

15 public class LocalDelegatingCacheLoaderTest extends CacheLoaderTestsBase {
16    TreeCache delegating_cache;
17    DelegatingCacheLoader cache_loader;
18
19
20    protected void configureCache() throws Exception JavaDoc {
21       delegating_cache=new TreeCache();
22       delegating_cache.setCacheMode(TreeCache.LOCAL);
23       delegating_cache.createService();
24       delegating_cache.startService();
25       cache_loader=new LocalDelegatingCacheLoader(delegating_cache);
26       cache.setCacheLoader(cache_loader);
27    }
28
29    protected void tearDown() throws Exception JavaDoc {
30       super.tearDown();
31       delegating_cache.stopService();
32       delegating_cache.destroyService();
33    }
34
35
36    public static Test suite() {
37       return new TestSuite(LocalDelegatingCacheLoaderTest.class);
38    }
39
40
41    public static void main(String JavaDoc[] args) {
42       junit.textui.TestRunner.run(suite());
43    }
44
45 }
46
Popular Tags