|
||||||||||
| 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.commons.AbstractVfsTestCase
public abstract class AbstractVfsTestCase
A base class for VFS tests. Provides utility methods for locating test resources.
| Constructor Summary | |
|---|---|
AbstractVfsTestCase()
|
|
| Method Summary | |
|---|---|
static void |
assertSameMessage(String[] messages,
Throwable throwable)
Asserts that an exception chain contains the expected messages. |
static void |
assertSameMessage(String code,
Object[] params,
Throwable throwable)
Asserts that an exception contains the expected message. |
static void |
assertSameMessage(String code,
Object param,
Throwable throwable)
Asserts that an exception contains the expected message. |
static void |
assertSameMessage(String code,
Throwable throwable)
Asserts that an exception contains the expected message. |
static boolean |
equals(Object o1,
Object o2)
Compares 2 objects for equality, nulls are equal. |
static File |
getCanonicalFile(File file)
Makes a file canonical |
static Throwable |
getCause(Throwable throwable)
Returns the cause of an exception. |
static String |
getPackageName(Class<?> clazz)
Returns the name of the package containing a class. |
static String |
getResourceTestDirectory()
|
static String |
getTestDirectory()
|
static File |
getTestDirectory(String name)
Locates a test directory, creating it if it does not exist. |
static File |
getTestDirectoryFile()
Locates the base directory for this test. |
static File |
getTestResource(String name)
Locates a test resource, and asserts that the resource exists |
static File |
getTestResource(String name,
boolean mustExist)
Locates a test resource. |
| 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, failNotEquals, failNotSame, failSame, format |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public AbstractVfsTestCase()
| Method Detail |
|---|
public static String getPackageName(Class<?> clazz)
public static File getTestResource(String name)
name - path of the resource, relative to this test's base directory.
public static File getTestResource(String name,
boolean mustExist)
name - path of the resource, relative to this test's base directory.public static File getTestDirectoryFile()
public static String getTestDirectory()
public static String getResourceTestDirectory()
public static File getTestDirectory(String name)
name - path of the directory, relative to this test's base directory.public static File getCanonicalFile(File file)
public static void assertSameMessage(String[] messages,
Throwable throwable)
messages - The messages, in order. A null entry in this array
indicates that the message should be ignored.public static Throwable getCause(Throwable throwable)
public static void assertSameMessage(String code,
Throwable throwable)
public static void assertSameMessage(String code,
Object[] params,
Throwable throwable)
public static void assertSameMessage(String code,
Object param,
Throwable throwable)
public static boolean equals(Object o1,
Object o2)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||