src/test/java/de/blau/android/osm/RelationUtilTest.java
/**
     * Load some test data in to storage
     * 
     * @param c Class
     * @return the StorageDelegator
     * 
     */
Load some test data in to storage

@param c Class
@return the StorageDelegator
Load some test data in to storage @param c Class @return the StorageDelegator
@NonNull
    public static StorageDelegator loadTestData(@NonNull Class c) {
        StorageDelegator d = App.getDelegator();
        InputStream input = c.getResourceAsStream("/rings.osm");
        OsmParser parser = new OsmParser();
        try {
            parser.start(input);
            Storage storage = parser.getStorage();
            d.setCurrentStorage(storage);
            d.fixupApiStorage();
        } catch (SAXException | IOException | ParserConfigurationException | IllegalArgumentException | IllegalStateException e) {
            fail(e.getMessage());
        }
        return d;
    }
@ NonNull public static StorageDelegator loadTestData ( @ NonNull Class c ) { StorageDelegator d = App . getDelegator ( ) ; InputStream input = c . getResourceAsStream ( "/rings.osm" ) ; OsmParser parser = new OsmParser ( ) ; try { parser . start ( input ) ; Storage storage = parser . getStorage ( ) ; d . setCurrentStorage ( storage ) ; d . fixupApiStorage ( ) ; } catch ( SAXException | IOException | ParserConfigurationException | IllegalArgumentException | IllegalStateException e ) { fail ( e . getMessage ( ) ) ; } return d ; }
Load some test data in to storage
Load some test data in to storage