Skip to content

Commit

Permalink
(refactor) Include debug info
Browse files Browse the repository at this point in the history
  • Loading branch information
JordanMartinez committed Sep 7, 2017
1 parent f5114f5 commit 0422388
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 8 deletions.
Expand Up @@ -31,6 +31,7 @@

import static org.testfx.api.FxAssert.verifyThat;
import static org.testfx.matcher.base.NodeMatchers.hasText;
import static org.testfx.util.DebugUtils.informedErrorMessage;

public class ApplicationLaunchTest extends FxRobot {

Expand Down Expand Up @@ -69,7 +70,7 @@ public void cleanup() throws Exception {
@Test
public void should_contain_button() {
// expect:
verifyThat(".button", hasText("click me!"));
verifyThat(".button", hasText("click me!"), informedErrorMessage(this));
}

@Test
Expand All @@ -78,7 +79,7 @@ public void should_click_on_button() {
clickOn(".button");

// then:
verifyThat(".button", hasText("clicked!"));
verifyThat(".button", hasText("clicked!"), informedErrorMessage(this));
}

}
Expand Up @@ -27,6 +27,7 @@

import static org.testfx.api.FxAssert.verifyThat;
import static org.testfx.matcher.base.NodeMatchers.hasText;
import static org.testfx.util.DebugUtils.informedErrorMessage;

public class ApplicationStartTest extends ApplicationTest {

Expand Down Expand Up @@ -59,7 +60,7 @@ public void stop() throws Exception {
@Test
public void should_contain_button() {
// expect:
verifyThat(".button", hasText("click me!"));
verifyThat(".button", hasText("click me!"), informedErrorMessage(this));
}

@Test
Expand All @@ -68,7 +69,7 @@ public void should_click_on_button() {
clickOn(".button");

// then:
verifyThat(".button", hasText("clicked!"));
verifyThat(".button", hasText("clicked!"), informedErrorMessage(this));
}

}
Expand Up @@ -31,6 +31,7 @@

import static org.testfx.api.FxAssert.verifyThat;
import static org.testfx.matcher.base.NodeMatchers.hasText;
import static org.testfx.util.DebugUtils.informedErrorMessage;

public class ApplicationLaunchTest extends FxRobot {

Expand Down Expand Up @@ -69,7 +70,7 @@ void cleanup() throws Exception {
@Test
void should_contain_button() {
// expect:
verifyThat(".button", hasText("click me!"));
verifyThat(".button", hasText("click me!"), informedErrorMessage(this));
}

@Test
Expand All @@ -78,7 +79,7 @@ void should_click_on_button() {
clickOn(".button");

// then:
verifyThat(".button", hasText("clicked!"));
verifyThat(".button", hasText("clicked!"), informedErrorMessage(this));
}

}
Expand Up @@ -27,6 +27,7 @@

import static org.testfx.api.FxAssert.verifyThat;
import static org.testfx.matcher.base.NodeMatchers.hasText;
import static org.testfx.util.DebugUtils.informedErrorMessage;

class ApplicationStartTest extends ApplicationTest {

Expand Down Expand Up @@ -59,7 +60,7 @@ public void stop() throws Exception {
@Test
void should_contain_button() {
// expect:
verifyThat(".button", hasText("click me!"));
verifyThat(".button", hasText("click me!"), informedErrorMessage(this));
}

@Test
Expand All @@ -68,7 +69,7 @@ void should_click_on_button() {
clickOn(".button");

// then:
verifyThat(".button", hasText("clicked!"));
verifyThat(".button", hasText("clicked!"), informedErrorMessage(this));
}

}

0 comments on commit 0422388

Please sign in to comment.