Changeset 3056 in josm for trunk/test


Ignore:
Timestamp:
2010-02-27T17:04:37+01:00 (15 years ago)
Author:
jttt
Message:

Revert fix for #4612

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/test/unit/org/openstreetmap/josm/data/osm/OsmPrimitiveTest.java

    r2407 r3056  
    110110    }
    111111
     112    @Test
     113    public void nodeFromMultipleDatasets() {
     114        // n has two referrers - w1 and w2. But only w1 is returned because it is in the same dataset as n
     115        Node n = new Node();
     116
     117        Way w1 = new Way();
     118        w1.addNode(n);
     119        dataSet.addPrimitive(n);
     120        dataSet.addPrimitive(w1);
     121        new Way(w1);
     122
     123        Assert.assertEquals(n.getReferrers().size(), 1);
     124        Assert.assertEquals(n.getReferrers().get(0), w1);
     125    }
     126
     127    @Test(expected=DataIntegrityProblemException.class)
     128    public void checkMustBeInDatasate() {
     129        Node n = new Node();
     130        n.getReferrers();
     131    }
     132
    112133}
Note: See TracChangeset for help on using the changeset viewer.