Changeset 16946 in josm for trunk/test
- Timestamp:
- 2020-08-28T20:16:25+02:00 (4 years ago)
- Location:
- trunk/test/unit/org/openstreetmap/josm/tools
- Files:
-
- 1 added
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/test/unit/org/openstreetmap/josm/tools/OsmPrimitiveImageProviderTest.java
r16926 r16946 61 61 assertNotNull(OsmPrimitiveImageProvider.getResource(OsmUtils.createPrimitive("way waterway=stream"), noDefault)); 62 62 assertNotNull(OsmPrimitiveImageProvider.getResource(OsmUtils.createPrimitive("relation type=route route=railway"), noDefault)); 63 // a non-square svg icon 63 } 64 65 /** 66 * Unit test of {@link OsmPrimitiveImageProvider#getResource} for non-square images. 67 */ 68 @Test 69 public void testGetResourceNonSquare() { 64 70 final ImageIcon bankIcon = OsmPrimitiveImageProvider 65 71 .getResource(OsmUtils.createPrimitive("node amenity=bank"), Options.DEFAULT) … … 67 73 assertEquals(ImageProvider.ImageSizes.LARGEICON.getVirtualWidth(), bankIcon.getIconWidth()); 68 74 assertEquals(ImageProvider.ImageSizes.LARGEICON.getVirtualHeight(), bankIcon.getIconHeight()); 75 final ImageIcon addressIcon = OsmPrimitiveImageProvider 76 .getResource(OsmUtils.createPrimitive("node \"addr:housenumber\"=123"), Options.DEFAULT) 77 .getPaddedIcon(ImageProvider.ImageSizes.LARGEICON.getImageDimension()); 78 assertEquals(ImageProvider.ImageSizes.LARGEICON.getVirtualWidth(), addressIcon.getIconWidth()); 79 assertEquals(ImageProvider.ImageSizes.LARGEICON.getVirtualHeight(), addressIcon.getIconHeight()); 69 80 } 70 81 }
Note:
See TracChangeset
for help on using the changeset viewer.