1 20 package org.enhydra.barracuda.taskdefs; 21 22 import junit.framework.TestCase; 24 25 import org.apache.log4j.Logger; 27 28 import java.io.File ; 30 31 import org.enhydra.xml.xmlc.taskdef.*; 32 33 import org.enhydra.barracuda.testbed.*; 34 35 38 public class TestXmlcUtilsCreate extends DefaultTestCase { 39 40 44 49 public TestXmlcUtilsCreate( String theName) { 50 super( theName ); 51 } 52 53 57 protected void setUp() throws Exception { 58 super.setUp(); 59 } 60 61 65 protected void tearDown() throws Exception { 66 super.tearDown(); 67 } 68 69 public void testCreate() { 73 XmlcUtils xmlcUtils = XmlcUtils.create(); 74 75 assertEquals( "Default create should return a default implementation", 76 DefaultXmlcUtilsImpl.class, 77 xmlcUtils.getClass() ); 78 79 System.setProperty(XmlcUtils.DEFAULT_UTILS_CLASS_KEY, String .class.getName() ); 80 81 xmlcUtils = XmlcUtils.create(); 82 83 assertEquals( "Improper create should return a default implementation", 84 DefaultXmlcUtilsImpl.class, 85 xmlcUtils.getClass() ); 86 87 System.setProperty(XmlcUtils.DEFAULT_UTILS_CLASS_KEY, DummyXmlcUtils.class.getName() ); 88 89 xmlcUtils = XmlcUtils.create(); 90 91 assertEquals( "Improper create should return dummy implementation", 92 DummyXmlcUtils.class, 93 xmlcUtils.getClass() ); 94 } 95 96 100 104 private static final Logger theirLogger = Logger.getLogger( TestXmlcUtilsCreate.class.getName() ); 106 107 } 108 | Popular Tags |