Ignore:
Timestamp:
2017-04-22T17:57:11+02:00 (7 years ago)
Author:
Don-vip
Message:

add unit tests, javadoc

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/test/unit/org/openstreetmap/josm/gui/preferences/plugin/PluginPreferenceTest.java

    r10378 r11974  
    1717import org.openstreetmap.josm.gui.progress.NullProgressMonitor;
    1818import org.openstreetmap.josm.plugins.PluginDownloadTask;
     19import org.openstreetmap.josm.plugins.PluginException;
    1920import org.openstreetmap.josm.plugins.PluginInformation;
    2021
     
    4142
    4243    /**
     44     * Returns a dummy plugin information.
     45     * @return a dummy plugin information
     46     * @throws PluginException if an error occurs
     47     */
     48    public static PluginInformation getDummyPluginInformation() throws PluginException {
     49        return new PluginInformation(
     50                new File(TestUtils.getTestDataRoot() + "plugin/dummy_plugin.jar"), "dummy_plugin");
     51    }
     52
     53    /**
    4354     * Unit test of {@link PluginPreference#buildDownloadSummary}.
    4455     * @throws Exception if an error occurs
     
    4657    @Test
    4758    public void testBuildDownloadSummary() throws Exception {
    48         final PluginInformation dummy = new PluginInformation(
    49                 new File(TestUtils.getTestDataRoot() + "plugin/dummy_plugin.jar"), "dummy_plugin");
     59        final PluginInformation dummy = getDummyPluginInformation();
    5060        assertEquals("", PluginPreference.buildDownloadSummary(
    5161                new PluginDownloadTask(NullProgressMonitor.INSTANCE, Collections.<PluginInformation>emptyList(), "")));
Note: See TracChangeset for help on using the changeset viewer.