Changeset 11175 in josm for trunk/test/unit


Ignore:
Timestamp:
2016-10-27T00:32:44+02:00 (8 years ago)
Author:
simon04
Message:

APIDataSet: simplify implementation using streams, add test

File:
1 edited

Legend:

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

    r10945 r11175  
    33
    44import static org.junit.Assert.assertEquals;
     5import static org.junit.Assert.assertFalse;
    56import static org.junit.Assert.assertTrue;
    67import static org.junit.Assert.fail;
     
    1213import org.openstreetmap.josm.actions.upload.CyclicUploadDependencyException;
    1314import org.openstreetmap.josm.data.APIDataSet;
     15import org.openstreetmap.josm.data.conflict.ConflictCollection;
    1416import org.openstreetmap.josm.testutils.JOSMTestRules;
    1517
     
    104106        assertEquals(1, toUpdate.size());
    105107        assertEquals(r4, toUpdate.get(0));
     108
     109        final ConflictCollection cc4 = new ConflictCollection();
     110        cc4.add(r4, r4);
     111        assertTrue(apiDataSet.participatesInConflict(cc4));
     112        final ConflictCollection cc1 = new ConflictCollection();
     113        cc1.add(r1, r1);
     114        assertFalse(apiDataSet.participatesInConflict(cc1));
    106115    }
    107116
Note: See TracChangeset for help on using the changeset viewer.