Changeset 16583 in josm for trunk/test/unit/org/openstreetmap
- Timestamp:
- 2020-06-08T23:14:53+02:00 (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/test/unit/org/openstreetmap/josm/gui/mappaint/mapcss/FunctionsTest.java
r16110 r16583 13 13 import org.openstreetmap.josm.data.osm.User; 14 14 import org.openstreetmap.josm.gui.mappaint.Environment; 15 import org.openstreetmap.josm.gui.util.GuiHelper; 16 import org.openstreetmap.josm.spi.preferences.Config; 15 17 import org.openstreetmap.josm.testutils.JOSMTestRules; 16 18 … … 104 106 assertEquals(1d, Functions.to_double("1"), 1e-10); 105 107 } 108 109 /** 110 * Unit test of {@link Functions#JOSM_pref} 111 */ 112 @Test 113 public void testPref() { 114 String key = "Functions.JOSM_pref"; 115 assertEquals("foobar", Functions.JOSM_pref(null, key, "foobar")); 116 Config.getPref().put(key, "baz"); 117 GuiHelper.runInEDTAndWait(() -> { 118 // await org.openstreetmap.josm.gui.mappaint.ElemStyles.clearCached 119 }); 120 assertEquals("baz", Functions.JOSM_pref(null, key, "foobar")); 121 Config.getPref().put(key, null); 122 GuiHelper.runInEDTAndWait(() -> { 123 // await org.openstreetmap.josm.gui.mappaint.ElemStyles.clearCached 124 }); 125 assertEquals("foobar", Functions.JOSM_pref(null, key, "foobar")); 126 } 106 127 }
Note:
See TracChangeset
for help on using the changeset viewer.