KickJava   Java API By Example, From Geeks To Geeks.

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


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.tests;
8
9 import junit.framework.Test;
10 import junit.framework.TestSuite;
11 import org.jboss.cache.TreeCache;
12 import org.jboss.cache.loader.DelegatingCacheLoader;
13 import org.jboss.cache.loader.LocalDelegatingCacheLoader;
14
15 /**
16  * Created by IntelliJ IDEA.
17  * User: bela
18  * Date: Jun 9, 2004
19  * Time: 9:05:19 AM
20  */

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