KickJava   Java API By Example, From Geeks To Geeks.

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


1 package org.jboss.cache.tests.loader;
2
3 import junit.framework.Test;
4 import junit.framework.TestSuite;
5
6 import java.util.Properties JavaDoc;
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 FileCacheLoaderTest extends CacheLoaderTestsBase {
15
16
17    protected void configureCache() throws Exception JavaDoc {
18       String JavaDoc tmp_location=System.getProperty("java.io.tmpdir", "c:\\tmp");
19       cache.setCacheLoaderClass("org.jboss.cache.loader.FileCacheLoader");
20       Properties JavaDoc props=new Properties JavaDoc();
21       props.setProperty("location", tmp_location);
22       System.out.println("using temp location " + tmp_location);
23       cache.setCacheLoaderConfig(props);
24    }
25
26
27
28
29    public static Test suite() {
30       return new TestSuite(FileCacheLoaderTest.class);
31    }
32
33
34    public static void main(String JavaDoc[] args) {
35       junit.textui.TestRunner.run(suite());
36    }
37
38 }
39
Popular Tags