Changeset 31909 in osm for applications/editors/josm/plugins/mapillary/test/unit
- Timestamp:
- 2016-01-02T14:22:20+01:00 (9 years ago)
- Location:
- applications/editors/josm/plugins/mapillary/test/unit/org/openstreetmap/josm/plugins/mapillary
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/mapillary/test/unit/org/openstreetmap/josm/plugins/mapillary/MapillaryDataTest.java
r31882 r31909 45 45 46 46 this.data = new MapillaryData(); 47 this.data.add(new ConcurrentSkipListSet(this.seq.getImages())); 47 this.data.add(new ConcurrentSkipListSet<>(this.seq.getImages())); 48 48 } 49 49 … … 60 60 this.data.add(this.img1); 61 61 assertEquals(1, this.data.getImages().size()); 62 this.data.add(new ConcurrentSkipListSet(Arrays.asList(new MapillaryAbstractImage[] { this.img2, 62 this.data.add(new ConcurrentSkipListSet<>(Arrays.asList(new MapillaryAbstractImage[] { this.img2, 63 63 this.img3 }))); 64 64 assertEquals(3, this.data.getImages().size()); 65 this.data.add(new ConcurrentSkipListSet(Arrays.asList(new MapillaryAbstractImage[] { this.img3, 65 this.data.add(new ConcurrentSkipListSet<>(Arrays.asList(new MapillaryAbstractImage[] { this.img3, 66 66 this.img4 }))); 67 67 assertEquals(4, this.data.getImages().size()); -
applications/editors/josm/plugins/mapillary/test/unit/org/openstreetmap/josm/plugins/mapillary/gui/MapillaryPreferenceSettingTest.java
r31823 r31909 56 56 } 57 57 58 private Object getPrivateField(MapillaryPreferenceSetting object, String name) throws IllegalArgumentException, IllegalAccessException, NoSuchFieldException, SecurityException { 58 private static Object getPrivateField(MapillaryPreferenceSetting object, String name) throws IllegalArgumentException, IllegalAccessException, NoSuchFieldException, SecurityException { 59 59 Field field = object.getClass().getDeclaredField(name); 60 60 field.setAccessible(true); -
applications/editors/josm/plugins/mapillary/test/unit/org/openstreetmap/josm/plugins/mapillary/history/MapillaryRecordTest.java
r31882 r31909 16 16 import org.openstreetmap.josm.plugins.mapillary.MapillaryImage; 17 17 import org.openstreetmap.josm.plugins.mapillary.MapillaryLayer; 18 import org.openstreetmap.josm.plugins.mapillary.history.MapillaryRecord;19 18 import org.openstreetmap.josm.plugins.mapillary.history.commands.CommandDelete; 20 19 import org.openstreetmap.josm.plugins.mapillary.history.commands.CommandImport; … … 56 55 public void commandTest() { 57 56 MapillaryCommand cmd12 = new CommandMove( 58 new ConcurrentSkipListSet(Arrays.asList(new MapillaryAbstractImage[]{this.img1, this.img2})), 57 new ConcurrentSkipListSet<>(Arrays.asList(new MapillaryAbstractImage[]{this.img1, this.img2})), 59 58 0.1, 0.1); 60 59 MapillaryCommand cmd23 = new CommandMove( 61 new ConcurrentSkipListSet(Arrays.asList(new MapillaryAbstractImage[]{this.img2, this.img3})), 60 new ConcurrentSkipListSet<>(Arrays.asList(new MapillaryAbstractImage[]{this.img2, this.img3})), 62 61 0.1, 0.1); 63 62 MapillaryCommand cmd13 = new CommandMove( 64 new ConcurrentSkipListSet(Arrays.asList(new MapillaryAbstractImage[]{this.img1, this.img3})), 63 new ConcurrentSkipListSet<>(Arrays.asList(new MapillaryAbstractImage[]{this.img1, this.img3})), 65 64 0.1, 0.1); 66 65 MapillaryCommand cmd1 = new CommandMove( 67 new ConcurrentSkipListSet(Arrays.asList(new MapillaryAbstractImage[]{this.img1})), 0.1, 0.1); 66 new ConcurrentSkipListSet<>(Arrays.asList(new MapillaryAbstractImage[]{this.img1})), 0.1, 0.1); 68 67 MapillaryCommand cmd31 = new CommandMove( 69 new ConcurrentSkipListSet(Arrays.asList(new MapillaryAbstractImage[]{this.img3, this.img1})), 68 new ConcurrentSkipListSet<>(Arrays.asList(new MapillaryAbstractImage[]{this.img3, this.img1})), 70 69 0.2, 0.2); 71 70 this.record.addCommand(cmd12); … … 112 111 public void commandMoveTest() { 113 112 CommandMove cmd1 = new CommandMove( 114 new ConcurrentSkipListSet(Arrays.asList(new MapillaryAbstractImage[]{this.img1, this.img2})), 113 new ConcurrentSkipListSet<>(Arrays.asList(new MapillaryAbstractImage[]{this.img1, this.img2})), 115 114 0.1, 0.1); 116 115 CommandMove cmd2 = new CommandMove( 117 new ConcurrentSkipListSet(Arrays.asList(new MapillaryAbstractImage[]{this.img1, this.img2})), 116 new ConcurrentSkipListSet<>(Arrays.asList(new MapillaryAbstractImage[]{this.img1, this.img2})), 118 117 0.1, 0.1); 119 118 … … 146 145 public void commandTurnTest() { 147 146 CommandTurn cmd1 = new CommandTurn( 148 new ConcurrentSkipListSet(Arrays.asList(new MapillaryAbstractImage[]{this.img1, this.img2})), 147 new ConcurrentSkipListSet<>(Arrays.asList(new MapillaryAbstractImage[]{this.img1, this.img2})), 149 148 0.2); 150 149 CommandTurn cmd2 = new CommandTurn( 151 new ConcurrentSkipListSet(Arrays.asList(new MapillaryAbstractImage[]{this.img1, this.img2})), 150 new ConcurrentSkipListSet<>(Arrays.asList(new MapillaryAbstractImage[]{this.img1, this.img2})), 152 151 0.1); 153 152 … … 253 252 254 253 CommandDelete cmd1 = new CommandDelete( 255 new ConcurrentSkipListSet(Arrays.asList(new MapillaryAbstractImage[]{this.img1}))); 254 new ConcurrentSkipListSet<>(Arrays.asList(new MapillaryAbstractImage[]{this.img1}))); 256 255 CommandDelete cmd2 = new CommandDelete( 257 new ConcurrentSkipListSet(Arrays.asList(new MapillaryAbstractImage[]{this.img2, this.img3}))); 256 new ConcurrentSkipListSet<>(Arrays.asList(new MapillaryAbstractImage[]{this.img2, this.img3}))); 258 257 259 258 this.record.addCommand(join1); … … 264 263 .getData() 265 264 .add( 266 new ConcurrentSkipListSet(Arrays.asList(new MapillaryAbstractImage[]{this.img1, this.img2, 265 new ConcurrentSkipListSet<>(Arrays.asList(new MapillaryAbstractImage[]{this.img1, this.img2, 267 266 this.img3}))); 268 267 … … 286 285 287 286 CommandImport cmd1 = new CommandImport( 288 new ConcurrentSkipListSet(Arrays.asList(new MapillaryAbstractImage[]{this.img1}))); 287 new ConcurrentSkipListSet<>(Arrays.asList(new MapillaryAbstractImage[]{this.img1}))); 289 288 CommandImport cmd2 = new CommandImport( 290 new ConcurrentSkipListSet(Arrays.asList(new MapillaryAbstractImage[]{this.img2, this.img3}))); 289 new ConcurrentSkipListSet<>(Arrays.asList(new MapillaryAbstractImage[]{this.img2, this.img3}))); 291 290 292 291 this.record.addCommand(cmd1); -
applications/editors/josm/plugins/mapillary/test/unit/org/openstreetmap/josm/plugins/mapillary/traffico/TrafficoSignElementTest.java
r31793 r31909 1 1 package org.openstreetmap.josm.plugins.mapillary.traffico; 2 2 3 import static org.junit.Assert.*; 3 import static org.junit.Assert.assertEquals; 4 import static org.junit.Assert.assertNotNull; 4 5 5 6 import java.awt.Color; … … 21 22 @Test(expected=IllegalArgumentException.class) 22 23 public void testNullColor() { 23 new TrafficoSignElement('\ufeed', null); 24 assertNotNull(new TrafficoSignElement('\ufeed', null)); 24 25 } 25 26 -
applications/editors/josm/plugins/mapillary/test/unit/org/openstreetmap/josm/plugins/mapillary/utils/MapillaryURLTest.java
r31833 r31909 183 183 } 184 184 185 private void assertUrlEquals(URL actualUrl, String expectedBaseUrl, String... expectedParams) { 185 private static void assertUrlEquals(URL actualUrl, String expectedBaseUrl, String... expectedParams) { 186 186 assertEquals(expectedBaseUrl, actualUrl.toString().substring(0, actualUrl.toString().indexOf('?'))); 187 187 String[] actualParams = actualUrl.getQuery().split("&");
Note:
See TracChangeset
for help on using the changeset viewer.