velocity-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nbu...@apache.org
Subject svn commit: r553999 - /velocity/tools/branches/2.x/src/test/java/org/apache/velocity/tools/test/whitebox/ConfigTests.java
Date Fri, 06 Jul 2007 19:04:40 GMT
Author: nbubna
Date: Fri Jul  6 12:04:39 2007
New Revision: 553999

URL: http://svn.apache.org/viewvc?view=rev&rev=553999
Log:
clean things up a bit

Modified:
    velocity/tools/branches/2.x/src/test/java/org/apache/velocity/tools/test/whitebox/ConfigTests.java

Modified: velocity/tools/branches/2.x/src/test/java/org/apache/velocity/tools/test/whitebox/ConfigTests.java
URL: http://svn.apache.org/viewvc/velocity/tools/branches/2.x/src/test/java/org/apache/velocity/tools/test/whitebox/ConfigTests.java?view=diff&rev=553999&r1=553998&r2=553999
==============================================================================
--- velocity/tools/branches/2.x/src/test/java/org/apache/velocity/tools/test/whitebox/ConfigTests.java
(original)
+++ velocity/tools/branches/2.x/src/test/java/org/apache/velocity/tools/test/whitebox/ConfigTests.java
Fri Jul  6 12:04:39 2007
@@ -20,30 +20,18 @@
  */
 
 import java.util.Locale;
-import java.util.Map;
-import java.util.Calendar;
-import java.util.Date;
-import java.util.GregorianCalendar;
-
 import org.junit.*;
 import static org.junit.Assert.*;
-
-import org.apache.velocity.tools.generic.Alternator;
-import org.apache.velocity.tools.generic.AlternatorTool;
-import org.apache.velocity.tools.generic.ComparisonDateTool;
 import org.apache.velocity.tools.generic.DateTool;
-import org.apache.velocity.tools.generic.EscapeTool;
 import org.apache.velocity.tools.generic.MathTool;
 import org.apache.velocity.tools.generic.NumberTool;
-import org.apache.velocity.tools.generic.ResourceTool;
-import org.apache.velocity.tools.ToolManager;
 import org.apache.velocity.tools.config.*;
 
 /**
  * <p>Configuration tests.</p>
  *
  * @author Nathan Bubna
- * @since Velocity Tools 2.0
+ * @since VelocityTools 2.0
  * @version $Id$
  */
 public class ConfigTests {
@@ -75,30 +63,20 @@
                 tool.setProperty("locale", Locale.FRENCH);
                 toolbox.addTool(tool);
             baseline.addToolbox(toolbox);
-System.out.println("baseline: \n"+baseline.toString()+"\n\n");
     }
 
-    /*public static @BeforeClass void initConfigTests() throws Exception {
-        ToolManager manager = new ToolManager(false);
-        manager.configure(TOOLBOX_PATH);
-        toolbox = manager.createContext();
-    }*/
-
     public @Test void testXmlConfig()
     {
-        XmlFactoryConfiguration xml = new XmlFactoryConfiguration();
+        FileFactoryConfiguration xml = new XmlFactoryConfiguration();
         xml.read(XML_PATH);
-System.out.println("xml: \n"+xml.toString()+"\n\n");
 
         assertConfigEquals(baseline, xml);
     }
 
     public @Test void testPropsConfig()
     {
-        PropertiesFactoryConfiguration props =
-            new PropertiesFactoryConfiguration();
+        FileFactoryConfiguration props = new PropertiesFactoryConfiguration();
         props.read(PROPS_PATH);
-System.out.println("props: \n"+props.toString()+"\n\n");
 
         assertConfigEquals(baseline, props);
     }
@@ -107,12 +85,11 @@
     {
         EasyFactoryConfiguration easy = new EasyFactoryConfiguration();
         easy.toolbox("request")
-          .property("locale", Locale.US)
-         .tool(DateTool.class)
-         .tool("calc", MathTool.class);
+            .property("locale", Locale.US)
+            .tool(DateTool.class)
+            .tool("calc", MathTool.class);
         easy.toolbox("application")
-         .tool(NumberTool.class).property("locale", Locale.FRENCH);
-System.out.println("easy: \n"+easy.toString()+"\n\n");
+            .tool(NumberTool.class).property("locale", Locale.FRENCH);
 
         assertConfigEquals(baseline, easy);
     }



Mime
View raw message