Skip to content

Commit

Permalink
Kind of fixed few tests failing on windows
Browse files Browse the repository at this point in the history
  • Loading branch information
torakiki committed Dec 12, 2014
1 parent 4e9a0c4 commit 6f51a34
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 9 deletions.
9 changes: 5 additions & 4 deletions pdfsam-community/pom.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<description>PDFsam App</description>
<url>http://www.pdfsam.org</url>
Expand All @@ -11,7 +12,7 @@
</parent>

<artifactId>pdfsam-community</artifactId>
<version>3.0.0.M1-SNAPSHOT</version>
<version>3.0.0.M1-SNAPSHOT</version>
<packaging>jar</packaging>
<name>PDFsam Community Edition application</name>

Expand Down Expand Up @@ -165,11 +166,11 @@
</build>
</profile>
</profiles>

<properties>
<pdfsam.package>COMMUNITY</pdfsam.package>
</properties>

<build>
<resources>
<resource>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,9 @@ public void loadBrokenWorkspace() throws IOException {
public void cannotAccessWorkspace() throws IOException {
File file = folder.newFile();
FileUtils.copyInputStreamToFile(getClass().getResourceAsStream("/workspace.json"), file);
file.setReadable(false);
if (!file.setReadable(false)) {
throw new RuntimeException("OS does not implement read pemissions");
}
victim.loadWorkspace(file);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -138,12 +138,12 @@ public void saveStateEmptySelection() {
}

@Test
public void restoreState() {
public void restoreState() throws Exception {
BookmarksLevelComboBox victim = find("#victim");
Map<String, String> data = new HashMap<>();
data.put("levelCombo.max", "3");
data.put("levelCombo.selected", "2");
victim.restoreStateFrom(data);
FXTestUtils.invokeAndWait(() -> victim.restoreStateFrom(data), 2);
assertEquals("2", victim.getSelectionModel().getSelectedItem());
assertEquals(3, victim.getItems().size());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,12 +117,12 @@ public void saveStateEmptyRegexp() {
}

@Test
public void restoreState() {
public void restoreState() throws Exception {
SplitOptionsPane victim = find(".pdfsam-container");
Map<String, String> data = new HashMap<>();
data.put("regexp", "Chuck");
data.put("levelCombo.selected", "2");
victim.restoreStateFrom(data);
FXTestUtils.invokeAndWait(() -> victim.restoreStateFrom(data), 2);
TextField field = find("#bookmarksRegexp");
assertEquals("Chuck", field.getText());
BookmarksLevelComboBox levelCombo = find("#bookmarksLevel");
Expand Down

0 comments on commit 6f51a34

Please sign in to comment.