velocity-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nbu...@apache.org
Subject svn commit: r718298 - /velocity/engine/trunk/src/test/org/apache/velocity/test/BaseEvalTestCase.java
Date Mon, 17 Nov 2008 17:56:43 GMT
Author: nbubna
Date: Mon Nov 17 09:56:43 2008
New Revision: 718298

URL: http://svn.apache.org/viewvc?rev=718298&view=rev
Log:
add another assertion method

Modified:
    velocity/engine/trunk/src/test/org/apache/velocity/test/BaseEvalTestCase.java

Modified: velocity/engine/trunk/src/test/org/apache/velocity/test/BaseEvalTestCase.java
URL: http://svn.apache.org/viewvc/velocity/engine/trunk/src/test/org/apache/velocity/test/BaseEvalTestCase.java?rev=718298&r1=718297&r2=718298&view=diff
==============================================================================
--- velocity/engine/trunk/src/test/org/apache/velocity/test/BaseEvalTestCase.java (original)
+++ velocity/engine/trunk/src/test/org/apache/velocity/test/BaseEvalTestCase.java Mon Nov
17 09:56:43 2008
@@ -81,6 +81,20 @@
         // extension hook
     }
 
+    protected void assertContextValue(String key, Object expected)
+    {
+        if (DEBUG)
+        {
+            engine.getLog().info("Expected value of '"+key+"': "+expected);
+        }
+        Object value = context.get(key);
+        if (DEBUG)
+        {
+            engine.getLog().info("Result: "+value);
+        }
+        assertEquals(expected, value);
+    }
+
     protected void assertEvalEquals(String expected, String template)
     {
         if (DEBUG)



Mime
View raw message