public class FileAssert extends GenericAssert<FileAssert,File>
File.
To create a new instance of this class invoke .
Assertions.assertThat(File)
actual, myself| Modifier | Constructor and Description |
|---|---|
protected |
FileAssert(File actual)
Creates a new
FileAssert. |
| Modifier and Type | Method and Description |
|---|---|
FileAssert |
doesNotExist()
Verifies that the actual
File does not exist. |
FileAssert |
exists()
Verifies that the actual
File does exist. |
FileAssert |
hasSameContentAs(File expected)
Verifies that the content of the actual
File is equal to the content of the given one. |
FileAssert |
hasSize(long expected)
Verifies that the size of the actual
File is equal to the given one. |
FileAssert |
isAbsolute()
Verifies that the actual
File is an absolute path. |
FileAssert |
isDirectory()
Verifies that the actual
File is a directory. |
FileAssert |
isFile()
Verifies that the actual
File is a regular file. |
FileAssert |
isRelative()
Verifies that the actual
File is a relative path. |
as, as, describedAs, describedAs, doesNotSatisfy, is, isEqualTo, isIn, isIn, isNot, isNotEqualTo, isNotIn, isNotIn, isNotNull, isNotSameAs, isNull, isSameAs, overridingErrorMessage, satisfiescustomErrorMessage, description, description, description, equals, fail, fail, failIfCustomMessageIsSet, failIfCustomMessageIsSet, failure, formattedErrorMessage, hashCode, rawDescription, replaceDefaultErrorMessagesWithprotected FileAssert(File actual)
FileAssert.actual - the target to verify.public FileAssert doesNotExist()
File does not exist.AssertionError - if the the actual File is null.AssertionError - if the actual File exists.public FileAssert exists()
File does exist.AssertionError - if the the actual File is null.AssertionError - if the actual File does not exist.public FileAssert hasSize(long expected)
File is equal to the given one.expected - the expected size of the actual File.AssertionError - if the the actual File is null.AssertionError - if the size of the actual File is not equal to the given one.public FileAssert isDirectory()
File is a directory.AssertionError - if the the actual File is null.AssertionError - if the actual File is not a directory.public FileAssert isFile()
File is a regular file.AssertionError - if the the actual File is null.AssertionError - if the actual File is not a regular file.public FileAssert hasSameContentAs(File expected)
File is equal to the content of the given one. Adapted from
FileAssert (from
JUnit-addons.)expected - the given File to compare the actual File to.NullPointerException - if the file to compare to is null.AssertionError - if the the actual File is null.AssertionError - if the content of the actual File is not equal to the content of the given one.public FileAssert isRelative()
File is a relative path.AssertionError - if the actual File is not a relative path.public FileAssert isAbsolute()
File is an absolute path.AssertionError - if the actual File is not an absolute path.Copyright © 2007-2012 FEST (Fixtures for Easy Software Testing). All Rights Reserved.