blob: 5df52729ae12c6188cc64facb61c810a3fd0ab63 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
package cgeo.geocaching.activity;
import cgeo.geocaching.cgeo;
import android.test.ActivityInstrumentationTestCase2;
public class ProgressTest extends ActivityInstrumentationTestCase2<cgeo> {
public ProgressTest() {
super("cgeo.geocaching", cgeo.class);
}
public void testProgressWrapper() {
final Progress progress = new Progress();
assertFalse(progress.isShowing()); // nothing shown initially
progress.show(getActivity(), "Title", "Message", true, false);
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());
}
}
}
|