src/test/java/de/blau/android/osm/GpxApiTest.java
/**
     * Get user GPX files with BB filter
     */
Get user GPX files with BB filter
Get user GPX files with BB filter
@Test
    public void userGpxFiles() {
        final Server s = new Server(ApplicationProvider.getApplicationContext(), prefDB.getCurrentAPI(), GENERATOR_NAME);
        mockServer.enqueue(GPX_FILES_FIXTURE);
        List<GpxFile> result = OsmGpxApi.getUserGpxFiles(s, new BoundingBox(8.37578, 47.4100, 8.37580, 47.4110));
        assertNotNull(result);
        assertEquals(1, result.size());
        boolean found = false;
        for (GpxFile g : result) {
            if (2631740L == g.getId() && g.getTags().contains("trrrrrr") && "test".equals(g.getDescription()) && "2018_03_10T152010.gpx".equals(g.getName())) {
                found = true;
            }
        }
        if (!found) {
            fail("file 2631740 not found");
        }
    }
@ Test public void userGpxFiles ( ) { final Server s = new Server ( ApplicationProvider . getApplicationContext ( ) , prefDB . getCurrentAPI ( ) , GENERATOR_NAME ) ; mockServer . enqueue ( GPX_FILES_FIXTURE ) ; List < GpxFile > result = OsmGpxApi . getUserGpxFiles ( s , new BoundingBox ( 8.37578 , 47.4100 , 8.37580 , 47.4110 ) ) ; assertNotNull ( result ) ; assertEquals ( 1 , result . size ( ) ) ; boolean found = false ; for ( GpxFile g : result ) { if ( 2631740L == g . getId ( ) && g . getTags ( ) . contains ( "trrrrrr" ) && "test" . equals ( g . getDescription ( ) ) && "2018_03_10T152010.gpx" . equals ( g . getName ( ) ) ) { found = true ; } } if ( ! found ) { fail ( "file 2631740 not found" ) ; } }
Get user GPX files with BB filter
Get user GPX files with BB filter
// from fixture