aboutsummaryrefslogtreecommitdiffstats
path: root/tests/src/cgeo/CGeoTestCase.java
blob: 6a63cbcdca76e27b87fc4d00239d97dc80369096 (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;

import cgeo.geocaching.cgData;
import cgeo.geocaching.cgeoapplication;
import cgeo.geocaching.enumerations.LoadFlags;

import android.test.ApplicationTestCase;

public abstract class CGeoTestCase extends ApplicationTestCase<cgeoapplication> {

    public CGeoTestCase() {
        super(cgeoapplication.class);
    }

    @Override
    protected void setUp() throws Exception {
        super.setUp();
        createApplication();
    }

    /** Remove cache from DB and cache to ensure that the cache is not loaded from the database */
    protected static void deleteCacheFromDB(String geocode) {
        cgData.removeCache(geocode, LoadFlags.REMOVE_ALL);
    }

}