You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@velocity.apache.org by nb...@apache.org on 2008/07/01 01:44:44 UTC

svn commit: r672959 - /velocity/engine/trunk/src/test/org/apache/velocity/test/BaseTestCase.java

Author: nbubna
Date: Mon Jun 30 16:44:43 2008
New Revision: 672959

URL: http://svn.apache.org/viewvc?rev=672959&view=rev
Log:
add helper method for getting file contents

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

Modified: velocity/engine/trunk/src/test/org/apache/velocity/test/BaseTestCase.java
URL: http://svn.apache.org/viewvc/velocity/engine/trunk/src/test/org/apache/velocity/test/BaseTestCase.java?rev=672959&r1=672958&r2=672959&view=diff
==============================================================================
--- velocity/engine/trunk/src/test/org/apache/velocity/test/BaseTestCase.java (original)
+++ velocity/engine/trunk/src/test/org/apache/velocity/test/BaseTestCase.java Mon Jun 30 16:44:43 2008
@@ -171,7 +171,13 @@
         return isMatch(result,compareDir,baseFileName,compareExt);
     }
 
-    
+
+    protected String getFileContents(String dir, String baseFileName, String ext)
+    {
+        return StringUtils
+            .fileContentsToString(getFileName(dir, baseFileName, ext, true));
+    }
+
     /**
      * Returns whether the processed template matches the
      * content of the provided comparison file.