package cgeo.geocaching.activity;

import cgeo.geocaching.MainActivity;

import android.annotation.TargetApi;
import android.test.ActivityInstrumentationTestCase2;

@TargetApi(8)
public class ProgressTest extends ActivityInstrumentationTestCase2<MainActivity> {
    public ProgressTest() {
        super(MainActivity.class);
    }

    public void testProgressWrapper() {
        final Progress progress = new Progress();

        assertFalse(progress.isShowing()); // nothing shown initially

        progress.show(getActivity(), "Title", "Message", true, null);
        assertTrue(progress.isShowing());

        progress.setMessage("Test");
        assertTrue(progress.isShowing());

        for (int i = 0; i < 2; i++) { // fault tolerant when dismissing to often
            progress.dismiss();
            assertFalse(progress.isShowing());
        }
    }
}

@@ -51,20 +51,21 @@
 caching.
-Main
+About
 Activity
@@ -159,16 +159,146 @@
 Case2;%0A%0A
+/**%0A * This test uses the about activity to avoid side effects like network and GPS being triggered by the main activity.%0A * %0A */%0A
 @TargetA
@@ -370,20 +370,21 @@
 stCase2%3C
-Main
+About
 Activity
@@ -433,12 +433,13 @@
 per(
-Main
+About
 Acti

remove warning about no network provider