Changeset 10409 in josm for trunk/test


Ignore:
Timestamp:
2016-06-17T02:58:36+02:00 (4 years ago)
Author:
Don-vip
Message:
  • remove duplicated code
  • fix various sonar warnings
  • add some javadoc and unit tests
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/test/unit/org/openstreetmap/josm/tools/ImageProviderTest.java

    r9231 r10409  
    6060        assertNotNull(ImageProvider.get("wiki://OpenJDK_logo.svg"));
    6161    }
     62
     63    /**
     64     * Test fetching an image using {@code data:} URL.
     65     */
     66    @Test
     67    public void testDataUrl() {
     68        // Red dot image, taken from https://en.wikipedia.org/wiki/Data_URI_scheme#HTML
     69        assertNotNull(ImageProvider.get("data:image/png;base64," +
     70                "iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHElEQVQI12P4"+
     71                "//8/w38GIAXDIBKE0DHxgljNBAAO9TXL0Y4OHwAAAABJRU5ErkJggg=="));
     72    }
    6273}
Note: See TracChangeset for help on using the changeset viewer.