package org.jboss.cache.loader;

import junit.framework.Test;
import junit.framework.TestSuite;

import java.io.File;

/**
 * Created by IntelliJ IDEA.
 * User: bela
 * Date: Jun 9, 2004
 * Time: 9:05:19 AM
 */
public class FileExtendedCacheLoaderTest extends ExtendedCacheLoaderTestsBase {

    private String tmp_location = System.getProperty("java.io.tmpdir", ".") + File.separator + "JBossCache-FileExtendedCacheLoaderTest";
    private File dir = new File(tmp_location);

    public FileExtendedCacheLoaderTest()
    {
        if (!dir.exists()) dir.mkdirs();
    }

    protected void configureCache() throws Exception {
      cache.setCacheLoaderConfiguration(getSingleCacheLoaderConfig("", "org.jboss.cache.loader.FileExtendedCacheLoader", "location=" + tmp_location, false, true, false));
   }

   public static Test suite() {
      return new TestSuite(FileExtendedCacheLoaderTest.class);
   }


   public static void main(String[] args) {
      junit.textui.TestRunner.run(suite());
   }

}
