aboutsummaryrefslogtreecommitdiffstats
path: root/tests/src/cgeo/geocaching/activity/logtrackable/AbstractLogTrackableActivityTest.java
blob: d93f1ad6fd0b6ac009d5b09d9cc45b1ec35fdcba (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
package cgeo.geocaching.activity.logtrackable;

import cgeo.geocaching.DataStore;
import cgeo.geocaching.LogTrackableActivity;
import cgeo.geocaching.Trackable;
import cgeo.geocaching.activity.AbstractEspressoTest;

public abstract class AbstractLogTrackableActivityTest extends AbstractEspressoTest<LogTrackableActivity> {

    private static Trackable trackable;

    public AbstractLogTrackableActivityTest() {
        super(LogTrackableActivity.class);
    }

    @Override
    protected void setUp() throws Exception {
        super.setUp();
        createTrackable();
        setActivityIntent(LogTrackableActivity.getIntent(getInstrumentation().getContext(), trackable));
        getActivity();
    }

    protected static void createTrackable() {
        trackable = new Trackable();
        trackable.setName("Test trackable");
        trackable.setGeocode("TB4D09K");
        DataStore.saveTrackable(trackable);
    }

}