/*
 * JBoss, Home of Professional Open Source
 *
 * Distributable under LGPL license.
 * See terms of license at gnu.org.
 */
package org.jboss.cache.aop.loader;

import org.w3c.dom.Element;
import org.jboss.cache.xml.XmlHelper;
import junit.framework.Test;
import junit.framework.TestSuite;

/**
 */
public class FileCacheLoaderAopCollectionsTest extends CacheLoaderTestsBase {


    protected Element getCacheLoaderConfig(String loc) throws Exception
    {
        String xml = "            <config>\n" +
                "                \n" +
                "                <passivation>false</passivation>\n" +
                "                <preload></preload>\n" +
                "\n" +
                "                <cacheloader>\n" +
                "                    <class>org.jboss.cache.loader.FileCacheLoader</class>\n" +
                "                    <properties>\n" +
                "                        location=" + loc + "\n" +
                "                    </properties>\n" +
                "                    <async>false</async>\n" +
                "                    <fetchPersistentState>false</fetchPersistentState>\n" +
                "                    <ignoreModifications>false</ignoreModifications>\n" +
                "                </cacheloader>\n" +
                "                \n" +
                "            </config>";
        return XmlHelper.stringToElement(xml);
    }

   protected void configureCache() throws Exception {
      String tmp_location = System.getProperty("java.io.tmpdir", "c:\\tmp");
      cache.setCacheLoaderConfiguration(getSingleCacheLoaderConfig("", "org.jboss.cache.loader.FileCacheLoader", "", false, true, false));
//       cache.setCacheLoaderConfiguration(getCacheLoaderConfig(tmp_location));
   }

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

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

   // leave in only the collectiosn test - override the rest.

   public void testEvictionWithCacheLoader()
   {
   }

   public void testPojoEvictionWithCacheLoader()
   {
   }

   public void testPojoRemoveWithCacheLoader()
   {
   }

}
