test/unit/org/openstreetmap/josm/plugins/opendata/core/io/NonRegFunctionalTests.java
public static void testGeneric(String context, DataSet ds) {
        CheckParameterUtil.ensureParameterNotNull(ds, "ds");
        // Every dataset should at least contain a node
        Collection<Node> nodes = ds.getNodes();
        assertFalse("No nodes in dataset for "+context, nodes.isEmpty());
        // Nodes should all have valid coordinates
        for (Node n : nodes) {
            LatLon latlon = n.getCoor();
            assertTrue("Node without coordinate found for "+context, latlon != null);
            assertTrue("Node with invalid coordinate ("+latlon+") found for "+context, latlon.isValid());
            assertFalse("Node with outside world coordinate ("+latlon+") found for "+context, latlon.isOutSideWorld());
        }
        // and no empty ways
        for (Way w : ds.getWays()) {
            assertTrue("Empty way found for "+context, w.getNodesCount() > 0);
        }
        // neither empty relations
        for (Relation r : ds.getRelations()) {
            assertTrue("Empty relation found for "+context, r.getMembersCount() > 0);
        }
    }
/**
     * Non-regression generic test.
     * @param context context
     * @param ds data set
     */
Non-regression generic test.
@param context context
@param ds data set
Non - regression generic test . @param context context @param ds data set
public static void testGeneric(String context, DataSet ds) {
        CheckParameterUtil.ensureParameterNotNull(ds, "ds");
        Collection<Node> nodes = ds.getNodes();
        assertFalse("No nodes in dataset for "+context, nodes.isEmpty());
        for (Node n : nodes) {
            LatLon latlon = n.getCoor();
            assertTrue("Node without coordinate found for "+context, latlon != null);
            assertTrue("Node with invalid coordinate ("+latlon+") found for "+context, latlon.isValid());
            assertFalse("Node with outside world coordinate ("+latlon+") found for "+context, latlon.isOutSideWorld());
        }
        for (Way w : ds.getWays()) {
            assertTrue("Empty way found for "+context, w.getNodesCount() > 0);
        }
        for (Relation r : ds.getRelations()) {
            assertTrue("Empty relation found for "+context, r.getMembersCount() > 0);
        }
    }
public static void testGeneric ( String context , DataSet ds ) { CheckParameterUtil . ensureParameterNotNull ( ds , "ds" ) ; Collection < Node > nodes = ds . getNodes ( ) ; assertFalse ( "No nodes in dataset for " + context , nodes . isEmpty ( ) ) ; for ( Node n : nodes ) { LatLon latlon = n . getCoor ( ) ; assertTrue ( "Node without coordinate found for " + context , latlon != null ) ; assertTrue ( "Node with invalid coordinate (" + latlon + ") found for " + context , latlon . isValid ( ) ) ; assertFalse ( "Node with outside world coordinate (" + latlon + ") found for " + context , latlon . isOutSideWorld ( ) ) ; } for ( Way w : ds . getWays ( ) ) { assertTrue ( "Empty way found for " + context , w . getNodesCount ( ) > 0 ) ; } for ( Relation r : ds . getRelations ( ) ) { assertTrue ( "Empty relation found for " + context , r . getMembersCount ( ) > 0 ) ; } }
Non-regression generic test.
Non - regression generic test .
// Every dataset should at least contain a node
 // Nodes should all have valid coordinates
 // and no empty ways
 // neither empty relations
