aboutsummaryrefslogtreecommitdiffstats
path: root/tests/src/cgeo/geocaching/export/ExportTest.java
blob: 5d3d13778660b673de969d724c686663d3226e91 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
package cgeo.geocaching.export;

import cgeo.CGeoTestCase;
import cgeo.geocaching.LogEntry;
import cgeo.geocaching.cgCache;
import cgeo.geocaching.enumerations.LogType;

public class ExportTest extends CGeoTestCase {

    public static void testGSAKExport() {
        final cgCache cache = new cgCache();
        cache.setGeocode("GCX1234");
        final LogEntry log = new LogEntry(1353244820000L, LogType.FOUND_IT, "Hidden in a tree");
        final StringBuilder logStr = new StringBuilder();
        FieldnoteExport.appendFieldNote(logStr, cache, log);
        assertEquals("GCX1234,2012-11-18T14:20:20Z,Found it,\"Hidden in a tree\"\n", logStr.toString());
    }

}