Changeset 17081 in josm for trunk/test/unit/org


Ignore:
Timestamp:
2020-10-01T21:17:32+02:00 (4 years ago)
Author:
Don-vip
Message:

fix #19865 - IOOBE selecting several pictures and attempting to delete them (patch by francois2)

File:
1 edited

Legend:

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

    r15352 r17081  
    196196
    197197    @Test
     198    public void testRemoveSelectedImagesWithRemainingImages() {
     199        List<ImageEntry> list = getOneImage();
     200        list.add(new ImageEntry());
     201        list.add(new ImageEntry());
     202
     203        ImageData data = new ImageData(list);
     204        data.selectLastImage();
     205        data.addImageToSelection(list.get(1));
     206        data.removeSelectedImages();
     207        assertEquals(1, data.getImages().size());
     208        assertEquals(1, data.getSelectedImages().size());
     209    }
     210
     211    @Test
    198212    public void testSelectImageAfterRemove() {
    199213        List<ImageEntry> list = getOneImage();
     
    347361        data.selectFirstImage();
    348362        assertEquals(1, data.getSelectedImages().size());
    349 
    350363    }
    351364
Note: See TracChangeset for help on using the changeset viewer.