diff options
author | Bananeweizen <bananeweizen@gmx.de> | 2014-11-15 19:43:40 +0100 |
---|---|---|
committer | Bananeweizen <bananeweizen@gmx.de> | 2014-11-15 19:43:40 +0100 |
commit | a2f526d23567f9a56fa4e3d4c911348f119bcc85 (patch) | |
tree | 8d2b65a132b5a5c69f6e2fc8d5351be23f9158f5 | |
parent | 8da4866f39a47db547121c504af7f72160f715b1 (diff) | |
download | cgeo-a2f526d23567f9a56fa4e3d4c911348f119bcc85.zip cgeo-a2f526d23567f9a56fa4e3d4c911348f119bcc85.tar.gz cgeo-a2f526d23567f9a56fa4e3d4c911348f119bcc85.tar.bz2 |
remove robotium test framework
It has not been used (except for one test). By now, espresso is
recommended over robotium in most cases due to the automatic
synchronization.
-rw-r--r-- | tests/libs/docs/robotium-solo-5.1-javadoc.jar | bin | 82789 -> 0 bytes | |||
-rw-r--r-- | tests/libs/robotium-solo-5.1.jar | bin | 112036 -> 0 bytes | |||
-rw-r--r-- | tests/libs/robotium-solo-5.1.jar.properties | 1 | ||||
-rw-r--r-- | tests/src/cgeo/geocaching/files/SimpleDirChooserUITest.java | 94 |
4 files changed, 0 insertions, 95 deletions
diff --git a/tests/libs/docs/robotium-solo-5.1-javadoc.jar b/tests/libs/docs/robotium-solo-5.1-javadoc.jar Binary files differdeleted file mode 100644 index 92ebff2..0000000 --- a/tests/libs/docs/robotium-solo-5.1-javadoc.jar +++ /dev/null diff --git a/tests/libs/robotium-solo-5.1.jar b/tests/libs/robotium-solo-5.1.jar Binary files differdeleted file mode 100644 index 1931dd9..0000000 --- a/tests/libs/robotium-solo-5.1.jar +++ /dev/null diff --git a/tests/libs/robotium-solo-5.1.jar.properties b/tests/libs/robotium-solo-5.1.jar.properties deleted file mode 100644 index 9df11e1..0000000 --- a/tests/libs/robotium-solo-5.1.jar.properties +++ /dev/null @@ -1 +0,0 @@ -doc=./docs/robotium-solo-5.1-javadoc.jar
\ No newline at end of file diff --git a/tests/src/cgeo/geocaching/files/SimpleDirChooserUITest.java b/tests/src/cgeo/geocaching/files/SimpleDirChooserUITest.java deleted file mode 100644 index d8d099d..0000000 --- a/tests/src/cgeo/geocaching/files/SimpleDirChooserUITest.java +++ /dev/null @@ -1,94 +0,0 @@ -package cgeo.geocaching.files; - -import static org.assertj.core.api.Assertions.assertThat; - -import cgeo.geocaching.Intents; - -import com.robotium.solo.Solo; - -import android.annotation.TargetApi; -import android.content.Intent; -import android.os.Build; -import android.test.ActivityInstrumentationTestCase2; -import android.test.suitebuilder.annotation.Suppress; -import android.widget.CheckBox; - -import java.util.ArrayList; - -@TargetApi(Build.VERSION_CODES.FROYO) -@Suppress -public class SimpleDirChooserUITest extends ActivityInstrumentationTestCase2<SimpleDirChooser> { - - private Solo solo; - - public SimpleDirChooserUITest() { - super(SimpleDirChooser.class); - } - - @Override - public void setUp() throws Exception { - super.setUp(); - setActivityIntent(new Intent().putExtra(Intents.EXTRA_START_DIR, "").putExtra(SimpleDirChooser.EXTRA_CHOOSE_FOR_WRITING, false)); - solo = new Solo(getInstrumentation(), getActivity()); - } - - public ArrayList<CheckBox> getCurrentCheckBoxes() { - return solo.getCurrentViews(CheckBox.class); - } - - public void testSingleSelection() throws InterruptedException { - // normally our activity should be ready, but we already had Jenkins report no checkboxes right here at the beginning - solo.waitForActivity(solo.getCurrentActivity().getClass().getSimpleName(), 2000); - - assertChecked("Newly opened activity", 0); - solo.scrollToBottom(); - pause(); - // according to the documentation, automatic pauses only happen in the clickXYZ() methods. - // Therefore lets introduce a manual pause after the scrolling methods. - - final int lastIndex = getCurrentCheckBoxes().size() - 1; - - solo.clickOnCheckBox(lastIndex); - assertThat(solo.isCheckBoxChecked(lastIndex)).isTrue(); - assertThat(solo.isCheckBoxChecked(0)).isFalse(); - assertChecked("Clicked last checkbox", 1); - - solo.scrollUp(); - pause(); - solo.scrollToBottom(); - pause(); - assertChecked("Refreshing last checkbox", 1); - - solo.scrollToTop(); - pause(); - solo.clickOnCheckBox(0); - assertChecked("Clicked first checkbox", 1); - assertThat(solo.isCheckBoxChecked(0)).isTrue(); - solo.clickOnCheckBox(1); - assertChecked("Clicked second checkbox", 1); - assertThat(solo.isCheckBoxChecked(1)).isTrue(); - } - - private static void pause() throws InterruptedException { - Thread.sleep(100); - } - - private void assertChecked(String message, int expectedChecked) { - final ArrayList<CheckBox> boxes = getCurrentCheckBoxes(); - assertThat(boxes).as("Checkboxes").isNotNull(); - assertThat(boxes.size()).as("number of checkboxes").isGreaterThan(1); - int checked = 0; - for (int i = 0; i < boxes.size(); i++) { - if (solo.isCheckBoxChecked(i)) { - checked++; - } - } - assertEquals(message, expectedChecked, checked); - } - - @Override - public void tearDown() throws Exception { - solo.finishOpenedActivities(); - super.tearDown(); - } -} |