| java.lang.Object org.apache.anakia.test.TestUtil
TestUtil | public class TestUtil (Code) | | Miscellaneous routines to help with testing
version: $Id: TestUtil.java 524478 2007-03-31 20:51:49Z wglass $ |
assureResultsDirectoryExists | public static void assureResultsDirectoryExists(String resultsDirectory)(Code) | | Assures that the results directory exists. If the results directory
cannot be created, fails the test.
|
compareFiles | public static boolean compareFiles(String compareFileName, String resultsFileName) throws Exception(Code) | | Returns whether the processed template matches the
content of the provided comparison file.
Whether the output matches the contentsof the comparison file. exception: Exception - Test failure condition. |
compareTextWithFile | public static boolean compareTextWithFile(String resultText, String compareFileName) throws Exception(Code) | | Returns whether the processed template matches the
content of the provided comparison file.
Whether the output matches the contentsof the comparison file. exception: Exception - Test failure condition. |
normalizeNewlines | public static String normalizeNewlines(String source)(Code) | | Normalizes lines to account for platform differences. Macs use
a single \r, DOS derived operating systems use \r\n, and Unix
uses \n. Replace each with a single \n.
author: Sam Ruby source with all line terminations changed to Unix style |
|
|