org.opennms.test
Class FileAnticipator
java.lang.Object
junit.framework.Assert
org.opennms.test.FileAnticipator
public class FileAnticipator
- extends Assert
File anticipator.
Example usage with late initialization:
private FileAnticipator m_fileAnticipator;
- Author:
- DJ Gregor
| 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 |
FileAnticipator
public FileAnticipator()
throws IOException
- Throws:
IOException
FileAnticipator
public FileAnticipator(boolean initialize)
throws IOException
- Throws:
IOException
finalize
protected void finalize()
- Overrides:
finalize in class Object
tearDown
public void tearDown()
initialize
public void initialize()
throws IOException
- Throws:
IOException
generateRandomHexString
protected static String generateRandomHexString(int length)
getTempDir
public File getTempDir()
tempFile
public File tempFile(String name)
throws IOException
- Throws:
IOException
tempFile
public File tempFile(File parent,
String name)
throws IOException
- Throws:
IOException
tempFile
public File tempFile(String name,
String contents)
throws IOException
- Throws:
IOException
tempFile
public File tempFile(File parent,
String name,
String contents)
throws IOException
- Throws:
IOException
tempDir
public File tempDir(String name)
throws IOException
- Throws:
IOException
tempDir
public File tempDir(File parent,
String name)
throws IOException
- Throws:
IOException
expecting
public File expecting(String name)
expecting
public File expecting(File parent,
String name)
deleteExpected
public void deleteExpected()
- Delete expected files, throwing an AssertionFailedError if any of
the expected files don't exist.
deleteExpected
public void deleteExpected(boolean ignoreNonExistantFiles)
- Delete expected files, throwing an AssertionFailedError if any of
the expected files don't exist.
- Parameters:
ignoreNonExistantFiles - if true, non-existant files will be
ignored and will not throw an AssertionFailedError
- Throws:
AssertionFailedError - if ignoreNonExistantFiles is false
and an expected file does not exist, or if a file cannot be deleted
isInitialized
public boolean isInitialized()
Copyright ? 2007. All Rights Reserved.