|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.fest.assertions.api.AbstractAssert<FileAssert,File>
org.fest.assertions.api.FileAssert
public class FileAssert
Assertion methods for s.
File
To create a new instance of this class, invoke .
Assertions.assertThat(File)
| Field Summary |
|---|
| Fields inherited from class org.fest.assertions.api.AbstractAssert |
|---|
actual, myself |
| Constructor Summary | |
|---|---|
protected |
FileAssert(File actual)
|
| Method Summary | |
|---|---|
FileAssert |
doesNotExist()
Verifies that the actual File does not exist. |
FileAssert |
exists()
Verifies that the actual File exists, regardless it's a file or directory. |
FileAssert |
hasContentEqualTo(File expected)
Verifies that the content of the actual File is equal to the content of the given one. |
FileAssert |
isAbsolute()
Verifies that the actual File is an absolute path. |
FileAssert |
isDirectory()
Verifies that the actual File is an existing directory. |
FileAssert |
isFile()
Verifies that the actual File is an existing file. |
FileAssert |
isRelative()
Verifies that the actual File is a relative path. |
| Methods inherited from class org.fest.assertions.api.AbstractAssert |
|---|
as, as, describedAs, describedAs, descriptionText, doesNotHave, equals, has, hashCode, is, isEqualTo, isIn, isIn, isNot, isNotEqualTo, isNotIn, isNotIn, isNotNull, isNotSameAs, isNull, isSameAs, usingComparator, usingDefaultComparator |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
protected FileAssert(File actual)
| Method Detail |
|---|
public FileAssert exists()
File exists, regardless it's a file or directory.
this assertion object.
AssertionError - if the actual File is null.
AssertionError - if the actual File does not exist.public FileAssert doesNotExist()
File does not exist.
this assertion object.
AssertionError - if the actual File is null.
AssertionError - if the actual File exists.public FileAssert isFile()
File is an existing file.
this assertion object.
AssertionError - if the actual File is null.
AssertionError - if the actual File is not an existing file.public FileAssert isDirectory()
File is an existing directory.
this assertion object.
AssertionError - if the actual File is null.
AssertionError - if the actual File is not an existing file.public FileAssert isAbsolute()
File is an absolute path.
this assertion object.
AssertionError - if the actual File is null.
AssertionError - if the actual File is not an absolute path.public FileAssert isRelative()
File is a relative path.
this assertion object.
AssertionError - if the actual File is null.
AssertionError - if the actual File is not a relative path.public FileAssert hasContentEqualTo(File expected)
File is equal to the content of the given one.
expected - the given File to compare the actual File to.
this assertion object.
NullPointerException - if the given File is null.
IllegalArgumentException - if the given File is not an existing file.
AssertionError - if the actual File is null.
AssertionError - if the actual File is not an existing file.
org.fest.util.FilesException - if an I/O error occurs.
AssertionError - if the content of the actual File is not equal to the content of the given one.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||