blob: 8d97ce352f741c758878aad2529599973810f038 (
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
|
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() {
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());
}
}
}
|