Changeset 18260 in josm for trunk/test
- Timestamp:
- 2021-10-09T15:05:34+02:00 (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/test/unit/org/openstreetmap/josm/gui/tagging/presets/items/ComboTest.java
r18254 r18260 28 28 @RegisterExtension 29 29 @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD") 30 public JOSMTestRules test = new JOSMTestRules(). main().i18n("de");30 public JOSMTestRules test = new JOSMTestRules().preferences().main().i18n("de"); 31 31 32 32 /** … … 55 55 KeyedItem.LAST_VALUES.clear(); 56 56 KeyedItem.LAST_VALUES.put("addr:country", "AT"); 57 Combo.PROP_FILL_DEFAULT.put(false); 58 combo.use_last_as_default = 0; 57 59 58 combo.use_last_as_default = 0;59 60 combo.addToPanel(new JPanel(), TaggingPresetItemGuiSupport.create(false, way)); 60 61 assertEquals("", combo.getSelectedItem().value); … … 79 80 combo.addToPanel(new JPanel(), TaggingPresetItemGuiSupport.create(false, wayAT, waySI)); 80 81 assertEquals(Combo.DIFFERENT, combo.getSelectedItem().value); 82 83 Combo.PROP_FILL_DEFAULT.put(true); 84 combo.addToPanel(new JPanel(), TaggingPresetItemGuiSupport.create(false, way)); 85 assertEquals("AT", combo.getSelectedItem().value); 86 combo.addToPanel(new JPanel(), TaggingPresetItemGuiSupport.create(false, wayTagged)); 87 assertEquals("AT", combo.getSelectedItem().value); 88 combo.addToPanel(new JPanel(), TaggingPresetItemGuiSupport.create(false, wayAT)); 89 assertEquals("AT", combo.getSelectedItem().value); 90 combo.addToPanel(new JPanel(), TaggingPresetItemGuiSupport.create(false, waySI)); 91 assertEquals("SI", combo.getSelectedItem().value); 92 combo.addToPanel(new JPanel(), TaggingPresetItemGuiSupport.create(false, wayAT, waySI)); 93 assertEquals(Combo.DIFFERENT, combo.getSelectedItem().value); 94 Combo.PROP_FILL_DEFAULT.put(false); 81 95 combo.default_ = null; 82 96 … … 104 118 combo.addToPanel(new JPanel(), TaggingPresetItemGuiSupport.create(false, wayAT, waySI)); 105 119 assertEquals(Combo.DIFFERENT, combo.getSelectedItem().value); 120 combo.use_last_as_default = 0; 106 121 107 122 KeyedItem.LAST_VALUES.clear();
Note:
See TracChangeset
for help on using the changeset viewer.