Package org.jboss.cache

Source Code of org.jboss.cache.PropertyConfiguratorTest

/*
* JBoss, the OpenSource J2EE webOS
*
* Distributable under LGPL license.
* See terms of license at gnu.org.
*/
package org.jboss.cache;


import junit.framework.Test;
import junit.framework.TestCase;
import junit.framework.TestSuite;
import org.jboss.cache.PropertyConfigurator;
import org.jboss.cache.TreeCache;

/**
* @version $Revision: 402 $
*/
public class PropertyConfiguratorTest extends TestCase
{

   public PropertyConfiguratorTest(String s)
   {
      super(s);
   }

   public void setUp() throws Exception
   {
      super.setUp();
   }

   public void tearDown() throws Exception
   {
      super.tearDown();
   }

   public void testConfigure()
   {
      try {
         TreeCache cache = new TreeCache();
         PropertyConfigurator config = new PropertyConfigurator();
         config.configure(cache, "META-INF/local-service.xml");
         log("Cluster properties: " + cache.getClusterProperties());
         assertEquals("CacheMode", "LOCAL", cache.getCacheMode());
      } catch (Exception ex) {
         ex.printStackTrace();
         fail(ex.toString());
      }
   }

   void log(String msg)
   {
      System.out.println("-- " + msg);
   }

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

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

}
TOP

Related Classes of org.jboss.cache.PropertyConfiguratorTest

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.