Changeset 9829 in josm for trunk/test


Ignore:
Timestamp:
2016-02-19T02:34:18+01:00 (4 years ago)
Author:
Don-vip
Message:

fix warnings, add unit test

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/test/unit/org/openstreetmap/josm/data/PreferencesTest.groovy

    r7938 r9829  
     1// License: GPL. For details, see LICENSE file.
    12package org.openstreetmap.josm.data
    23
     
    2728        assert Main.pref.getDefaultColor("foo").alpha == 0x12
    2829    }
     30
     31    void testToXml() {
     32        assert Main.pref.toXML(true) == String.format(
     33            "<?xml version=\"1.0\" encoding=\"UTF-8\"?>%n" +
     34            "<preferences xmlns='http://josm.openstreetmap.de/preferences-1.0' version='%d'>%n" +
     35            "  <tag key='expert' value='true'/>%n" +
     36            "  <tag key='jdk.Arrays.useLegacyMergeSort' value='false'/>%n" +
     37            "  <tag key='language' value='en'/>%n" +
     38            "  <tag key='osm-server.url' value='http://api06.dev.openstreetmap.org/api'/>%n" +
     39            "  <tag key='osm-server.username' value='josm_test'/>%n" +
     40            "</preferences>%n", Version.getInstance().getVersion())
     41    }
    2942}
Note: See TracChangeset for help on using the changeset viewer.