|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjunit.framework.Assert
org.opennms.test.FileAnticipator
public class FileAnticipator
File anticipator. Example usage with late initialization:
private FileAnticipator m_fileAnticipator;
| Constructor Summary | |
|---|---|
FileAnticipator()
|
|
FileAnticipator(boolean initialize)
|
|
| Method Summary | |
|---|---|
void |
deleteExpected()
Delete expected files, throwing an AssertionFailedError if any of the expected files don't exist. |
void |
deleteExpected(boolean ignoreNonExistantFiles)
Delete expected files, throwing an AssertionFailedError if any of the expected files don't exist. |
File |
expecting(File parent,
String name)
|
File |
expecting(String name)
|
protected void |
finalize()
|
protected static String |
generateRandomHexString(int length)
|
File |
getTempDir()
|
void |
initialize()
|
boolean |
isInitialized()
|
void |
tearDown()
|
File |
tempDir(File parent,
String name)
|
File |
tempDir(String name)
|
File |
tempFile(File parent,
String name)
|
File |
tempFile(File parent,
String name,
String contents)
|
File |
tempFile(String name)
|
File |
tempFile(String name,
String contents)
|
| 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, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public FileAnticipator()
throws IOException
IOException
public FileAnticipator(boolean initialize)
throws IOException
IOException| Method Detail |
|---|
protected void finalize()
finalize in class Objectpublic void tearDown()
public void initialize()
throws IOException
IOExceptionprotected static String generateRandomHexString(int length)
public File getTempDir()
public File tempFile(String name)
throws IOException
IOException
public File tempFile(File parent,
String name)
throws IOException
IOException
public File tempFile(String name,
String contents)
throws IOException
IOException
public File tempFile(File parent,
String name,
String contents)
throws IOException
IOException
public File tempDir(String name)
throws IOException
IOException
public File tempDir(File parent,
String name)
throws IOException
IOExceptionpublic File expecting(String name)
public File expecting(File parent,
String name)
public void deleteExpected()
public void deleteExpected(boolean ignoreNonExistantFiles)
ignoreNonExistantFiles - if true, non-existant files will be
ignored and will not throw an AssertionFailedError
junit.framework.AssertionFailedError - if ignoreNonExistantFiles is false
and an expected file does not exist, or if a file cannot be deletedpublic boolean isInitialized()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||