|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjunit.framework.Assert
junit.framework.TestCase
org.apache.velocity.test.BaseTestCase
public abstract class BaseTestCase
Base test case that provides a few utility methods for the rest of the tests.
Field Summary |
---|
Fields inherited from interface org.apache.velocity.test.TemplateTestBase |
---|
CMP_FILE_EXT, COMPARE_DIR, FILE_RESOURCE_LOADER_PATH, RESULT_DIR, RESULT_FILE_EXT, TEST_CASE_PROPERTIES, TEST_COMPARE_DIR, TEST_RESULT_DIR, TMPL_FILE_EXT |
Constructor Summary | |
---|---|
BaseTestCase(String name)
Default constructor. |
Method Summary | |
---|---|
protected static void |
assureResultsDirectoryExists(String resultsDirectory)
Assures that the results directory exists. |
protected String |
getFileContents(String dir,
String baseFileName,
String ext)
|
protected static String |
getFileName(String dir,
String base,
String ext)
Concatenates the file name parts together appropriately. |
protected static String |
getFileName(String dir,
String base,
String ext,
boolean mustExist)
|
protected static String |
getTestCaseName(String s)
Turns a base file name into a test case name. |
protected boolean |
isMatch(String result,
String compareDir,
String baseFileName,
String compareExt)
Returns whether the processed template matches the content of the provided comparison file. |
protected boolean |
isMatch(String resultsDir,
String compareDir,
String baseFileName,
String resultExt,
String compareExt)
Returns whether the processed template matches the content of the provided comparison file. |
protected String |
normalizeNewlines(String source)
Normalizes lines to account for platform differences. |
Methods inherited from class junit.framework.TestCase |
---|
countTestCases, createResult, getName, run, run, runBare, runTest, setName, setUp, tearDown, toString |
Methods inherited from class junit.framework.Assert |
---|
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public BaseTestCase(String name)
Method Detail |
---|
protected static String getFileName(String dir, String base, String ext)
protected static String getFileName(String dir, String base, String ext, boolean mustExist)
protected static void assureResultsDirectoryExists(String resultsDirectory)
protected String normalizeNewlines(String source)
protected boolean isMatch(String resultsDir, String compareDir, String baseFileName, String resultExt, String compareExt) throws Exception
Exception
- Test failure condition.protected String getFileContents(String dir, String baseFileName, String ext)
protected boolean isMatch(String result, String compareDir, String baseFileName, String compareExt) throws Exception
Exception
- Test failure condition.protected static final String getTestCaseName(String s)
s
- The base file name.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |