Changeset 19611 in josm


Ignore:
Timestamp:
2026-08-09T23:42:42+02:00 (3 days ago)
Author:
Don-vip
Message:

avoid locale conflict in PresetClassificationsTest

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/test/unit/org/openstreetmap/josm/gui/tagging/presets/PresetClassificationsTest.java

    r18958 r19611  
    1010import java.util.EnumSet;
    1111import java.util.List;
     12import java.util.Locale;
    1213import java.util.stream.Collectors;
    1314
     
    2122import org.openstreetmap.josm.gui.tagging.presets.TaggingPresetSelector.PresetClassifications;
    2223import org.openstreetmap.josm.testutils.annotations.Territories;
     24import org.openstreetmap.josm.tools.I18n;
    2325import org.xml.sax.SAXException;
    2426
     
    3840    @BeforeAll
    3941    public static void setUp() throws IOException, SAXException {
     42        // @BeforeAll runs before the per-test I18n extension resets translations, so a leftover
     43        // non-English locale from a previous test class could get baked into the cached preset names below.
     44        I18n.set("en");
     45        Locale.setDefault(Locale.ENGLISH);
    4046        final Collection<TaggingPreset> presets = TaggingPresetReader.readAll("resource://data/defaultpresets.xml", true);
    4147        classifications.loadPresets(presets);
Note: See TracChangeset for help on using the changeset viewer.