|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.fest.assertions.Assert
org.fest.assertions.GenericAssert<FileAssert,File>
org.fest.assertions.FileAssert
public class FileAssert
Assertions for .
File
To create a new instance of this class invoke .
Assertions.assertThat(File)
| Field Summary |
|---|
| Fields inherited from class org.fest.assertions.GenericAssert |
|---|
actual, myself |
| Constructor Summary | |
|---|---|
protected |
FileAssert(File actual)
Creates a new FileAssert. |
| Method Summary | |
|---|---|
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. |
| Methods inherited from class org.fest.assertions.GenericAssert |
|---|
as, as, describedAs, describedAs, doesNotSatisfy, is, isEqualTo, isIn, isIn, isNot, isNotEqualTo, isNotIn, isNotIn, isNotNull, isNotSameAs, isNull, isSameAs, overridingErrorMessage, satisfies |
| Methods inherited from class org.fest.assertions.Assert |
|---|
customErrorMessage, description, description, description, equals, fail, fail, failIfCustomMessageIsSet, failIfCustomMessageIsSet, failure, formattedErrorMessage, hashCode, rawDescription, replaceDefaultErrorMessagesWith |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
protected FileAssert(File actual)
FileAssert.
actual - the target to verify.| Method Detail |
|---|
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.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||