Ignore:
Timestamp:
2016-08-19T03:43:18+02:00 (3 years ago)
Author:
Don-vip
Message:

see #13309 - fix most of deprecation warnings

File:
1 edited

Legend:

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

    r10467 r10853  
    66import org.openstreetmap.josm.JOSMFixture
    77import org.openstreetmap.josm.Main
     8import org.openstreetmap.josm.data.preferences.ColorProperty
    89
    910class PreferencesTest extends GroovyTestCase {
     
    1819
    1920    void testColorAlpha() {
    20         assert Main.pref.getColor("foo", new Color(0x12345678, true)).alpha == 0x12
     21        assert new ColorProperty("foo", new Color(0x12345678, true)).get().alpha == 0x12
    2122        assert Main.pref.putColor("bar", new Color(0x12345678, true))
    22         assert Main.pref.getColor("bar", null).alpha == 0x12
     23        assert new ColorProperty("bar", null).get().alpha == 0x12
    2324    }
    2425
    2526    void testColorNameAlpha() {
    26         assert Main.pref.getColor("foo", "bar", new Color(0x12345678, true)).alpha == 0x12
     27        assert new ColorProperty("foo", "bar", new Color(0x12345678, true)).get().alpha == 0x12
    2728        assert Main.pref.getDefaultColor("foo") == new Color(0x34, 0x56, 0x78, 0x12)
    2829        assert Main.pref.getDefaultColor("foo").alpha == 0x12
Note: See TracChangeset for help on using the changeset viewer.