Changeset 34173 in osm for applications/editors/josm
- Timestamp:
- 2018-04-28T20:31:37+02:00 (7 years ago)
- Location:
- applications/editors/josm/plugins/wikipedia
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/wikipedia/src/org/wikipedia/gui/SophoxServerPreference.java
r33808 r34173 32 32 public static class Factory implements PreferenceSettingFactory { 33 33 @Override 34 public Preference SettingcreatePreferenceSetting() {34 public SophoxServerPreference createPreferenceSetting() { 35 35 return new SophoxServerPreference(); 36 36 } -
applications/editors/josm/plugins/wikipedia/test/unit/org/wikipedia/gui/SophoxServerPreferenceTest.java
r33808 r34173 2 2 package org.wikipedia.gui; 3 3 4 import static org.junit.Assert.assertEquals; 4 5 import static org.junit.Assert.assertNotNull; 5 6 7 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; 6 8 import org.junit.Rule; 7 9 import org.junit.Test; 8 import org.openstreetmap.josm.gui.preferences.Preference sTestUtils;10 import org.openstreetmap.josm.gui.preferences.PreferenceTabbedPane; 9 11 import org.openstreetmap.josm.gui.preferences.server.ServerAccessPreference; 10 12 import org.openstreetmap.josm.testutils.JOSMTestRules; 11 12 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;13 13 14 14 /** … … 37 37 @Test 38 38 public void testAddGui() { 39 PreferencesTestUtils.doTestPreferenceSettingAddGui(new SophoxServerPreference.Factory(), ServerAccessPreference.class); 39 final SophoxServerPreference setting = new SophoxServerPreference.Factory().createPreferenceSetting(); 40 final PreferenceTabbedPane tabPane = new PreferenceTabbedPane(); 41 tabPane.buildGui(); 42 int tabs = tabPane.getSetting(ServerAccessPreference.class).getTabPane().getTabCount(); 43 setting.addGui(tabPane); 44 45 assertEquals(tabs + 1, tabPane.getSetting(ServerAccessPreference.class).getTabPane().getTabCount()); 46 assertEquals(tabPane.getSetting(ServerAccessPreference.class), setting.getTabPreferenceSetting(tabPane)); 47 48 setting.ok(); 40 49 } 41 50 }
Note:
See TracChangeset
for help on using the changeset viewer.