blob: 5857e46992ea1202789ecac4bfd0594751740643 (
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
29
30
31
32
33
|
package cgeo.geocaching.compatibility;
import cgeo.geocaching.MainActivity;
import android.test.ActivityInstrumentationTestCase2;
import junit.framework.Assert;
public class CompatibilityTest extends ActivityInstrumentationTestCase2<MainActivity> {
private MainActivity activity;
public CompatibilityTest() {
super(MainActivity.class);
}
@Override
protected void setUp() throws Exception {
super.setUp();
activity = getActivity();
}
public static void testDataChanged() {
// This should not raise an exception in any Android version
Compatibility.dataChanged("cgeo.geocaching");
}
public void testGetDirectionNow() {
final float angle = DirectionProvider.getDirectionNow(1.0f);
Assert.assertTrue(angle == 1.0f || angle == 91.0f || angle == 181.0f || angle == 271.0f);
}
}
|