|
||||||||||
| 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()
Constructor for FileAnticipator. |
|
FileAnticipator(boolean initialize)
Constructor for FileAnticipator. |
|
| 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)
expecting |
File |
expecting(String name)
expecting |
protected void |
finalize()
|
protected static String |
generateRandomHexString(int length)
generateRandomHexString |
File |
getTempDir()
getTempDir |
void |
initialize()
initialize |
boolean |
isInitialized()
isInitialized |
void |
tearDown()
tearDown |
File |
tempDir(File parent,
String name)
tempDir |
File |
tempDir(String name)
tempDir |
File |
tempFile(File parent,
String name)
tempFile |
File |
tempFile(File parent,
String name,
String contents)
tempFile |
File |
tempFile(String name)
tempFile |
File |
tempFile(String name,
String contents)
tempFile |
| 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
Constructor for FileAnticipator.
IOException - if any.
public FileAnticipator(boolean initialize)
throws IOException
Constructor for FileAnticipator.
initialize - a boolean.
IOException - if any.| Method Detail |
|---|
protected void finalize()
finalize in class Objectpublic void tearDown()
tearDown
public void initialize()
throws IOException
initialize
IOException - if any.protected static String generateRandomHexString(int length)
generateRandomHexString
length - a int.
String object.public File getTempDir()
getTempDir
File object.
public File tempFile(String name)
throws IOException
tempFile
name - a String object.
File object.
IOException - if any.
public File tempFile(File parent,
String name)
throws IOException
tempFile
parent - a File object.name - a String object.
File object.
IOException - if any.
public File tempFile(String name,
String contents)
throws IOException
tempFile
name - a String object.contents - a String object.
File object.
IOException - if any.
public File tempFile(File parent,
String name,
String contents)
throws IOException
tempFile
parent - a File object.name - a String object.contents - a String object.
File object.
IOException - if any.
public File tempDir(String name)
throws IOException
tempDir
name - a String object.
File object.
IOException - if any.
public File tempDir(File parent,
String name)
throws IOException
tempDir
parent - a File object.name - a String object.
File object.
IOException - if any.public File expecting(String name)
expecting
name - a String object.
File object.
public File expecting(File parent,
String name)
expecting
parent - a File object.name - a String object.
File object.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()
isInitialized
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||