public class FileAnticipator
extends org.junit.Assert
| Constructor and Description |
|---|
FileAnticipator()
Constructor for FileAnticipator.
|
FileAnticipator(boolean initialize)
Constructor for FileAnticipator.
|
| Modifier and Type | Method and Description |
|---|---|
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
|
void |
expectingFileWithPrefix(File parent,
String prefix,
String... suffixesToExclude) |
protected void |
finalize() |
boolean |
foundExpected() |
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
|
assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotEquals, assertNotEquals, assertNotEquals, assertNotEquals, assertNotEquals, assertNotEquals, assertNotEquals, assertNotEquals, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertThat, assertThat, assertTrue, assertTrue, fail, failpublic FileAnticipator()
throws IOException
Constructor for FileAnticipator.
IOException - if any.public FileAnticipator(boolean initialize)
throws IOException
Constructor for FileAnticipator.
initialize - a boolean.IOException - if any.protected void finalize()
throws Throwable
public 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 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 void expectingFileWithPrefix(File parent, String prefix, String... suffixesToExclude)
public void deleteExpected()
public void deleteExpected(boolean ignoreNonExistantFiles)
ignoreNonExistantFiles - if true, non-existant files will be
ignored and will not throw an AssertionFailedErrorjunit.framework.AssertionFailedError - if ignoreNonExistantFiles is false
and an expected file does not exist, or if a file cannot be deletedpublic boolean isInitialized()
isInitialized
public boolean foundExpected()
Copyright © 2022. All rights reserved.