Changeset 15348 in josm for trunk/test/unit
- Timestamp:
- 2019-09-12T23:23:47+02:00 (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/test/unit/org/openstreetmap/josm/data/ImageDataTest.java
r15334 r15348 183 183 184 184 @Test 185 public void testRemoveSelectedWithImageTriggerListener() { 185 public void testRemoveSelectedImages() { 186 List<ImageEntry> list = getOneImage(); 187 list.add(new ImageEntry()); 188 189 ImageData data = new ImageData(list); 190 data.selectFirstImage(); 191 data.addImageToSelection(list.get(1)); 192 data.removeSelectedImages(); 193 assertEquals(0, data.getImages().size()); 194 assertEquals(0, data.getSelectedImages().size()); 195 } 196 197 @Test 198 public void testRemoveSelectedImageTriggerListener() { 186 199 List<ImageEntry> list = getOneImage(); 187 200 list.add(new ImageEntry()); … … 200 213 data.selectFirstImage(); 201 214 data.removeSelectedImage(); 215 } 216 217 @Test 218 public void testRemoveSelectedImagesTriggerListener() { 219 List<ImageEntry> list = getOneImage(); 220 list.add(new ImageEntry()); 221 ImageData data = new ImageData(list); 222 ImageDataUpdateListener listener = new ImageDataUpdateListener() { 223 @Override 224 public void selectedImageChanged(ImageData data) {} 225 226 @Override 227 public void imageDataUpdated(ImageData data) {} 228 }; 229 new Expectations(listener) {{ 230 listener.selectedImageChanged(data); times = 2; 231 }}; 232 data.addImageDataUpdateListener(listener); 233 data.selectFirstImage(); 234 data.removeSelectedImages(); 202 235 } 203 236
Note:
See TracChangeset
for help on using the changeset viewer.