diff options
| author | Stefan Suhren <suhren.stefan@fh-swf.de> | 2015-06-15 14:56:54 +0200 |
|---|---|---|
| committer | Stefan Suhren <suhren.stefan@fh-swf.de> | 2015-06-15 14:56:54 +0200 |
| commit | da2478e2e84c7b6e68715c98e6c8a39e20125736 (patch) | |
| tree | 52004b2b0132cdfce1d81ad34de07477768f982e /test | |
| parent | 1844074b1255888fb519a4b6ffcfac06a27b9f19 (diff) | |
| download | UpnFx-da2478e2e84c7b6e68715c98e6c8a39e20125736.tar.gz UpnFx-da2478e2e84c7b6e68715c98e6c8a39e20125736.zip | |
Make CLX enter newNumber before clear and add TestCase for that
Diffstat (limited to 'test')
| -rw-r--r-- | test/gui/CalculatorTest.java | 35 |
1 files changed, 29 insertions, 6 deletions
diff --git a/test/gui/CalculatorTest.java b/test/gui/CalculatorTest.java index 77d3371..98c6516 100644 --- a/test/gui/CalculatorTest.java +++ b/test/gui/CalculatorTest.java @@ -15,6 +15,7 @@ import static org.loadui.testfx.Assertions.verifyThat; import static org.loadui.testfx.controls.Commons.hasText; import java.io.IOException; + import javafx.fxml.FXMLLoader; import javafx.scene.Parent; import javafx.scene.control.Button; @@ -29,9 +30,8 @@ public class CalculatorTest extends GuiTest { try { - return FXMLLoader - .load(CalculatorTest.class - .getResource("/de/fhswf/in/inf/upnfx/view/MainView.fxml")); + return FXMLLoader.load(CalculatorTest.class + .getResource("/de/fhswf/in/inf/upnfx/view/MainView.fxml")); } catch (IOException e) { @@ -44,15 +44,12 @@ public class CalculatorTest extends GuiTest { Button button = find("#0"); click(button); - button = find("#0"); click(button); button = find("#,"); click(button); - button = find("#,"); click(button); button = find("#0"); click(button); - button = find("#0"); click(button); button = find("#1"); click(button); @@ -60,6 +57,32 @@ public class CalculatorTest extends GuiTest } @Test + public void testClx() + { + Button button = find("#1"); + click(button); + button = find("#2"); + click(button); + button = find("#3"); + click(button); + button = find("#ENT"); + click(button); + verifyThat("#display", hasText("123.0")); + button = find("#4"); + click(button); + button = find("#5"); + click(button); + button = find("#6"); + click(button); + verifyThat("#display", hasText("456")); + button = find("#CLX"); + click(button); + verifyThat("#display", hasText("123.0")); + click(button); + verifyThat("#display", hasText("")); + } + + @Test public void testNumbers() { Button button = find("#0"); |
