Files.
| Modifier and Type | Field and Description |
|---|---|
| private static final FileFilter | |
| pack-priv BinaryDiff | |
| pack-priv Diff | |
| pack-priv Failures | |
| private static final Files | |
| pack-priv NioFilesWrapper | |
| private static final String |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public void | assertCanRead(AssertionInfo
contains information about the assertion. info, File the given file. actual)Asserts that the given file can be read by the application. |
| public void | assertCanWrite(AssertionInfo
contains information about the assertion. info, File the given file. actual)Asserts that the given file can be modified by the application. |
| public void | assertDoesNotExist(AssertionInfo
contains information about the assertion. info, File the given file. actual)Asserts that the given file does not exist. |
| public void | assertExists(AssertionInfo
contains information about the assertion. info, File the given file. actual)Asserts that the given file exists, regardless it's a file or directory. |
| public void | assertHasBinaryContent(AssertionInfo
contains information about the assertion. info, File the "actual" file. actual, byte[] the "expected" binary content. expected)Asserts that the given file has the given binary content. |
| public void | assertHasContent(AssertionInfo
contains information about the assertion. info, File the "actual" file. actual, String the "expected" text content. expected, Charset the charset to use to read the file. charset)Asserts that the given file has the given text content. |
| public void | |
| public void | |
| public void | |
| public void | |
| public void | assertHasExtension(AssertionInfo
contains information about the assertion. info, File the given file. actual, String the expected extension, it does not contains the expected)'.'Asserts that the given |
| public void | assertHasName(AssertionInfo
contains information about the assertion. info, File the given file. actual, String the expected file name. expected)Asserts that the given |
| public void | |
| public void | assertHasNoParent(AssertionInfo
contains information about the assertion. info, File the given file. actual)Asserts that the given |
| public void | assertHasParent(AssertionInfo
contains information about the assertion. info, File the given file. actual, File the expected parent expected)File.Asserts that the given |
| public void | assertHasSizeInBytes(AssertionInfo
contains information about the assertion. info, File the "actual" file. actual, long the "expected" file size. expectedSizeInBytes)Asserts that the given file has the given size in bytes. |
| public void | assertIsAbsolute(AssertionInfo
contains information about the assertion. info, File the given file. actual)Asserts that the given file is an absolute path. |
| public void | assertIsDirectory(AssertionInfo
contains information about the assertion. info, File the given file. actual)Asserts that the given file is an existing directory. |
| public void | |
| public void | |
| private void | assertIsDirectoryContaining(AssertionInfo info, File actual, FileFilter filter, String filterPresentation)
|
| public void | |
| public void | |
| private void | assertIsDirectoryNotContaining(AssertionInfo info, File actual, FileFilter filter, String filterPresentation)
|
| public void | |
| public void | |
| private void | assertIsDirectoryRecursivelyContaining(AssertionInfo info, File actual, Predicate<File> filter, String filterPresentation)
|
| public void | |
| public void | assertIsEmptyFile(AssertionInfo
contains information about the assertion. info, File the given file. actual)Asserts that the given |
| public void | assertIsExecutable(AssertionInfo
contains information about the assertion. info, File the given file. actual)Asserts that the given file can be executed by the application. |
| public void | assertIsFile(AssertionInfo
contains information about the assertion. info, File the given file. actual)Asserts that the given file is an existing file. |
| public void | |
| public void | assertIsNotEmptyFile(AssertionInfo
contains information about the assertion. info, File the given file. actual)Asserts that the given |
| public void | assertIsRelative(AssertionInfo
contains information about the assertion. info, File the given file. actual)Asserts that the given file is a relative path. |
| private static void | |
| public void | assertSameBinaryContentAs(AssertionInfo
contains information about the assertion. info, File the "actual" file. actual, File the "expected" file. expected)Asserts that the given files have the same binary content. |
| public void | assertSameContentAs(AssertionInfo
contains information about the assertion. info, File the "actual" file. actual, Charset Charset of the "actual" file.the "expected" file. expected, Charset Charset of the "actual" file.Asserts that the given files have same content. |
| private List | |
| private static FileFilter | |
| private List | |
| private Optional | |
| public static Files | Returns: the singleton instance of this class.Returns the singleton instance of this class. |
| private boolean | |
| private boolean | |
| private Stream | |
| private List | |
| private void |
| ANY | back to summary |
|---|---|
| private static final FileFilter ANY | |
| binaryDiff | back to summary |
|---|---|
| pack-priv BinaryDiff binaryDiff
| |
| diff | back to summary |
|---|---|
| pack-priv Diff diff
| |
| failures | back to summary |
|---|---|
| pack-priv Failures failures
| |
| INSTANCE | back to summary |
|---|---|
| private static final Files INSTANCE | |
| nioFilesWrapper | back to summary |
|---|---|
| pack-priv NioFilesWrapper nioFilesWrapper
| |
| UNABLE_TO_COMPARE_FILE_CONTENTS | back to summary |
|---|---|
| private static final String UNABLE_TO_COMPARE_FILE_CONTENTS | |
| Files | back to summary |
|---|---|
pack-priv Files()
| |
| assertCanRead | back to summary |
|---|---|
| public void assertCanRead(AssertionInfo info, File actual) Asserts that the given file can be read by the application.
| |
| assertCanWrite | back to summary |
|---|---|
| public void assertCanWrite(AssertionInfo info, File actual) Asserts that the given file can be modified by the application.
| |
| assertDoesNotExist | back to summary |
|---|---|
| public void assertDoesNotExist(AssertionInfo info, File actual) Asserts that the given file does not exist.
| |
| assertExists | back to summary |
|---|---|
| public void assertExists(AssertionInfo info, File actual) Asserts that the given file exists, regardless it's a file or directory.
| |
| assertHasBinaryContent | back to summary |
|---|---|
| public void assertHasBinaryContent(AssertionInfo info, File actual, byte[] expected) Asserts that the given file has the given binary content.
| |
| assertHasContent | back to summary |
|---|---|
| public void assertHasContent(AssertionInfo info, File actual, String expected, Charset charset) Asserts that the given file has the given text content.
| |
| assertHasDigest | back to summary |
|---|---|
| public void assertHasDigest(AssertionInfo info, File actual, MessageDigest digest, byte[] expected) | |
| assertHasDigest | back to summary |
|---|---|
| public void assertHasDigest(AssertionInfo info, File actual, MessageDigest digest, String expected) | |
| assertHasDigest | back to summary |
|---|---|
| public void assertHasDigest(AssertionInfo info, File actual, String algorithm, byte[] expected) | |
| assertHasDigest | back to summary |
|---|---|
| public void assertHasDigest(AssertionInfo info, File actual, String algorithm, String expected) | |
| assertHasExtension | back to summary |
|---|---|
| public void assertHasExtension(AssertionInfo info, File actual, String expected) Asserts that the given
| |
| assertHasName | back to summary |
|---|---|
| public void assertHasName(AssertionInfo info, File actual, String expected) Asserts that the given
| |
| assertHasNoExtension | back to summary |
|---|---|
| public void assertHasNoExtension(AssertionInfo info, File actual) | |
| assertHasNoParent | back to summary |
|---|---|
| public void assertHasNoParent(AssertionInfo info, File actual) Asserts that the given
| |
| assertHasParent | back to summary |
|---|---|
| public void assertHasParent(AssertionInfo info, File actual, File expected) Asserts that the given
| |
| assertHasSizeInBytes | back to summary |
|---|---|
| public void assertHasSizeInBytes(AssertionInfo info, File actual, long expectedSizeInBytes) Asserts that the given file has the given size in bytes.
| |
| assertIsAbsolute | back to summary |
|---|---|
| public void assertIsAbsolute(AssertionInfo info, File actual) Asserts that the given file is an absolute path.
| |
| assertIsDirectory | back to summary |
|---|---|
| public void assertIsDirectory(AssertionInfo info, File actual) Asserts that the given file is an existing directory.
| |
| assertIsDirectoryContaining | back to summary |
|---|---|
| public void assertIsDirectoryContaining(AssertionInfo info, File actual, Predicate<File> filter) | |
| assertIsDirectoryContaining | back to summary |
|---|---|
| public void assertIsDirectoryContaining(AssertionInfo info, File actual, String syntaxAndPattern) | |
| assertIsDirectoryContaining | back to summary |
|---|---|
| private void assertIsDirectoryContaining(AssertionInfo info, File actual, FileFilter filter, String filterPresentation) | |
| assertIsDirectoryNotContaining | back to summary |
|---|---|
| public void assertIsDirectoryNotContaining(AssertionInfo info, File actual, Predicate<File> filter) | |
| assertIsDirectoryNotContaining | back to summary |
|---|---|
| public void assertIsDirectoryNotContaining(AssertionInfo info, File actual, String syntaxAndPattern) | |
| assertIsDirectoryNotContaining | back to summary |
|---|---|
| private void assertIsDirectoryNotContaining(AssertionInfo info, File actual, FileFilter filter, String filterPresentation) | |
| assertIsDirectoryRecursivelyContaining | back to summary |
|---|---|
| public void assertIsDirectoryRecursivelyContaining(AssertionInfo info, File actual, String syntaxAndPattern) | |
| assertIsDirectoryRecursivelyContaining | back to summary |
|---|---|
| public void assertIsDirectoryRecursivelyContaining(AssertionInfo info, File actual, Predicate<File> filter) | |
| assertIsDirectoryRecursivelyContaining | back to summary |
|---|---|
| private void assertIsDirectoryRecursivelyContaining(AssertionInfo info, File actual, Predicate<File> filter, String filterPresentation) | |
| assertIsEmptyDirectory | back to summary |
|---|---|
| public void assertIsEmptyDirectory(AssertionInfo info, File actual) | |
| assertIsEmptyFile | back to summary |
|---|---|
| public void assertIsEmptyFile(AssertionInfo info, File actual) Asserts that the given
| |
| assertIsExecutable | back to summary |
|---|---|
| public void assertIsExecutable(AssertionInfo info, File actual) Asserts that the given file can be executed by the application.
| |
| assertIsFile | back to summary |
|---|---|
| public void assertIsFile(AssertionInfo info, File actual) Asserts that the given file is an existing file.
| |
| assertIsNotEmptyDirectory | back to summary |
|---|---|
| public void assertIsNotEmptyDirectory(AssertionInfo info, File actual) | |
| assertIsNotEmptyFile | back to summary |
|---|---|
| public void assertIsNotEmptyFile(AssertionInfo info, File actual) Asserts that the given
| |
| assertIsRelative | back to summary |
|---|---|
| public void assertIsRelative(AssertionInfo info, File actual) Asserts that the given file is a relative path.
| |
| assertNotNull | back to summary |
|---|---|
| private static void assertNotNull(AssertionInfo info, File actual) | |
| assertSameBinaryContentAs | back to summary |
|---|---|
| public void assertSameBinaryContentAs(AssertionInfo info, File actual, File expected) Asserts that the given files have the same binary content.
| |
| assertSameContentAs | back to summary |
|---|---|
| public void assertSameContentAs(AssertionInfo info, File actual, Charset actualCharset, File expected, Charset expectedCharset) Asserts that the given files have same content. Adapted from FileAssert (from JUnit-addons.)
| |
| directoryContent | back to summary |
|---|---|
| private List | |
| fileFilter | back to summary |
|---|---|
| private static FileFilter fileFilter(AssertionInfo info, File actual, String syntaxAndPattern) | |
| filterDirectory | back to summary |
|---|---|
| private List | |
| getFileExtension | back to summary |
|---|---|
| private Optional | |
| instance | back to summary |
|---|---|
| public static Files instance() Returns the singleton instance of this class.
| |
| isAbsolutePath | back to summary |
|---|---|
| private boolean isAbsolutePath(AssertionInfo info, File actual) | |
| isDirectoryRecursivelyContaining | back to summary |
|---|---|
| private boolean isDirectoryRecursivelyContaining(AssertionInfo info, File actual, Predicate<File> filter) | |
| recursiveContentOf | back to summary |
|---|---|
| private Stream | |
| sortedRecursiveContent | back to summary |
|---|---|
| private List | |
| verifyIsFile | back to summary |
|---|---|
| private void verifyIsFile(File expected) | |