1 7 package org.jboss.cache.tests.basic; 8 9 10 import junit.framework.Test; 11 import junit.framework.TestCase; 12 import junit.framework.TestSuite; 13 import org.jboss.cache.PropertyConfigurator; 14 import org.jboss.cache.TreeCache; 15 16 19 public class PropertyConfiguratorTest extends TestCase 20 { 21 22 public PropertyConfiguratorTest(String s) 23 { 24 super(s); 25 } 26 27 public void setUp() throws Exception 28 { 29 super.setUp(); 30 } 31 32 public void tearDown() throws Exception 33 { 34 super.tearDown(); 35 } 36 37 public void testConfigure() 38 { 39 try { 40 TreeCache cache = new TreeCache(); 41 PropertyConfigurator config = new PropertyConfigurator(); 42 config.configure(cache, "META-INF/local-service.xml"); 43 log("Cluster properties: " + cache.getClusterProperties()); 44 } catch (Exception ex) { 45 ex.printStackTrace(); 46 fail(ex.toString()); 47 } 48 } 49 50 void log(String msg) 51 { 52 System.out.println("-- " + msg); 53 } 54 55 public static Test suite() 56 { 57 return new TestSuite(PropertyConfiguratorTest.class); 58 } 59 60 public static void main(String [] args) 61 { 62 junit.textui.TestRunner.run(suite()); 63 } 64 65 } 66 | Popular Tags |