-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
5585292
commit e8a2b54
Showing
2 changed files
with
55 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 25 additions & 0 deletions
25
pdf-over-gui/src/test/java/gui/tests/FileExistsCondition.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
package gui.tests; | ||
|
||
import org.eclipse.swtbot.swt.finder.waits.DefaultCondition; | ||
|
||
import java.io.File; | ||
|
||
public class FileExistsCondition extends DefaultCondition { | ||
|
||
private final File file; | ||
|
||
public FileExistsCondition(File file) { | ||
this.file = file; | ||
} | ||
|
||
@Override | ||
public boolean test() { | ||
return file.exists(); | ||
} | ||
|
||
@Override | ||
public String getFailureMessage() { | ||
return String.format("Could not create output file %s", file.getName()); | ||
} | ||
|
||
} |