Changeset 14052 in josm for trunk/test/unit/org/openstreetmap/josm/gui/preferences/plugin
- Timestamp:
- 2018-07-26T22:01:31+02:00 (6 years ago)
- Location:
- trunk/test/unit/org/openstreetmap/josm/gui/preferences/plugin
- Files:
-
- 1 added
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/test/unit/org/openstreetmap/josm/gui/preferences/plugin/PluginPreferenceTest.java
r11974 r14052 10 10 import java.util.Collections; 11 11 12 import org.junit. BeforeClass;12 import org.junit.Rule; 13 13 import org.junit.Test; 14 import org.openstreetmap.josm.JOSMFixture;15 14 import org.openstreetmap.josm.TestUtils; 16 15 import org.openstreetmap.josm.gui.preferences.PreferencesTestUtils; … … 19 18 import org.openstreetmap.josm.plugins.PluginException; 20 19 import org.openstreetmap.josm.plugins.PluginInformation; 20 import org.openstreetmap.josm.testutils.mockers.HelpAwareOptionPaneMocker; 21 import org.openstreetmap.josm.testutils.JOSMTestRules; 22 23 import com.google.common.collect.ImmutableMap; 24 25 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; 21 26 22 27 /** … … 24 29 */ 25 30 public class PluginPreferenceTest { 26 27 31 /** 28 32 * Setup test. 29 33 */ 30 @BeforeClass 31 public static void setUpBeforeClass() { 32 JOSMFixture.createUnitTestFixture().init(); 33 } 34 @Rule 35 @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD") 36 public JOSMTestRules test = new JOSMTestRules().preferences().assertionsInEDT().platform(); 34 37 35 38 /** … … 48 51 public static PluginInformation getDummyPluginInformation() throws PluginException { 49 52 return new PluginInformation( 50 new File(TestUtils.getTestDataRoot() + " plugin/dummy_plugin.jar"), "dummy_plugin");53 new File(TestUtils.getTestDataRoot() + "__files/plugin/dummy_plugin.v31772.jar"), "dummy_plugin"); 51 54 } 52 55 … … 89 92 @Test 90 93 public void testNotifyDownloadResults() { 94 new HelpAwareOptionPaneMocker(ImmutableMap.<String, Object>builder() 95 .put("<html></html>", "OK") // (buildDownloadSummary() output was empty) 96 .put("<html>Please restart JOSM to activate the downloaded plugins.</html>", "OK") 97 .build() 98 ); 99 91 100 PluginDownloadTask task = new PluginDownloadTask(NullProgressMonitor.INSTANCE, Collections.<PluginInformation>emptyList(), ""); 92 101 PluginPreference.notifyDownloadResults(null, task, false);
Note:
See TracChangeset
for help on using the changeset viewer.