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.DefaultCacheFactory; |
7 |
| import org.jboss.cache.config.Configuration; |
8 |
| |
9 |
| |
10 |
| |
11 |
| |
12 |
| |
13 |
| |
14 |
| |
15 |
| public class LocalDelegatingCacheLoaderTest extends CacheLoaderTestsBase |
16 |
| { |
17 |
| CacheImpl delegating_cache; |
18 |
| |
19 |
59
| protected void configureCache() throws Exception
|
20 |
| { |
21 |
59
| delegating_cache = (CacheImpl) DefaultCacheFactory.getInstance().createCache(false);
|
22 |
59
| delegating_cache.getConfiguration().setCacheMode(Configuration.CacheMode.LOCAL);
|
23 |
59
| delegating_cache.create();
|
24 |
59
| delegating_cache.start();
|
25 |
| |
26 |
| |
27 |
59
| cache.getConfiguration().setCacheLoaderConfig(getSingleCacheLoaderConfig("", "org.jboss.cache.loader.LocalDelegatingCacheLoader", "", false, false, false));
|
28 |
| |
29 |
| |
30 |
59
| LocalDelegatingCacheLoader cacheLoader = new LocalDelegatingCacheLoader(delegating_cache);
|
31 |
59
| cache.setCacheLoader(cacheLoader);
|
32 |
| } |
33 |
| |
34 |
59
| protected void tearDown() throws Exception
|
35 |
| { |
36 |
59
| super.tearDown();
|
37 |
59
| delegating_cache.stop();
|
38 |
59
| delegating_cache.destroy();
|
39 |
| } |
40 |
| |
41 |
1
| public void testLoadAndStore() throws Exception
|
42 |
| { |
43 |
| |
44 |
| |
45 |
| } |
46 |
| |
47 |
1
| public void testPartialLoadAndStore()
|
48 |
| { |
49 |
| |
50 |
| } |
51 |
| |
52 |
1
| public void testBuddyBackupStore()
|
53 |
| { |
54 |
| |
55 |
| } |
56 |
| |
57 |
| |
58 |
1
| public static Test suite()
|
59 |
| { |
60 |
1
| return new TestSuite(LocalDelegatingCacheLoaderTest.class);
|
61 |
| } |
62 |
| |
63 |
| |
64 |
0
| public static void main(String[] args)
|
65 |
| { |
66 |
0
| junit.textui.TestRunner.run(suite());
|
67 |
| } |
68 |
| |
69 |
| } |