From 5d75720619041764eba156a22a6e715fb549202f Mon Sep 17 00:00:00 2001 From: tibbi Date: Wed, 30 Dec 2015 20:57:30 +0100 Subject: [PATCH] change an Espresso test to add all digits --- .../com/simple_calculator/MainActivityTest.java | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/app/src/androidTest/java/calculator/simplemobiletools/com/simple_calculator/MainActivityTest.java b/app/src/androidTest/java/calculator/simplemobiletools/com/simple_calculator/MainActivityTest.java index f35e7670..5d91eb36 100644 --- a/app/src/androidTest/java/calculator/simplemobiletools/com/simple_calculator/MainActivityTest.java +++ b/app/src/androidTest/java/calculator/simplemobiletools/com/simple_calculator/MainActivityTest.java @@ -19,9 +19,18 @@ public class MainActivityTest { @Rule public final ActivityTestRule activity = new ActivityTestRule<>(MainActivity.class); @Test - public void addSimpleDigit() { + public void addDigits() { + press(R.id.btn_1); + press(R.id.btn_2); + press(R.id.btn_3); + press(R.id.btn_4); press(R.id.btn_5); - checkResult("5"); + press(R.id.btn_6); + press(R.id.btn_7); + press(R.id.btn_8); + press(R.id.btn_9); + press(R.id.btn_0); + checkResult("1234567890"); } @Test @@ -76,7 +85,7 @@ public class MainActivityTest { } @Test - public void divisionbyZeroTest() { + public void divisionByZeroTest() { press(R.id.btn_8); press(R.id.btn_divide); press(R.id.btn_0);