Ignore:
Timestamp:
2018-08-12T17:24:32+02:00 (6 years ago)
Author:
Don-vip
Message:

see #15229 - deprecate Main.pref

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/test/unit/org/openstreetmap/josm/data/preferences/NamedColorPropertyTest.java

    r12989 r14149  
    1111import org.junit.Rule;
    1212import org.junit.Test;
    13 import org.openstreetmap.josm.Main;
     13import org.openstreetmap.josm.data.Preferences;
    1414import org.openstreetmap.josm.spi.preferences.Config;
    1515import org.openstreetmap.josm.testutils.JOSMTestRules;
     
    1818
    1919/**
    20  * Test {@link ColorProperty}
     20 * Test {@link NamedColorProperty}
    2121 * @author Michael Zangl
    2222 */
     
    3939
    4040    /**
    41      * Test {@link ColorProperty#get()}
     41     * Test {@link NamedColorProperty#get()}
    4242     */
    4343    @Test
     
    4747
    4848    /**
    49      * Test {@link ColorProperty#put}
     49     * Test {@link NamedColorProperty#put}
    5050     */
    5151    @Test
     
    6767    public void testColorAlpha() {
    6868        assertEquals(0x12, new NamedColorProperty("foo", new Color(0x12345678, true)).get().getAlpha());
    69         assertTrue(Main.pref.putList("clr.general.bar", Arrays.asList("#34567812", "general", "", "bar")));
     69        assertTrue(Preferences.main().putList("clr.general.bar", Arrays.asList("#34567812", "general", "", "bar")));
    7070        assertEquals(0x12, new NamedColorProperty("bar", Color.RED).get().getAlpha());
    7171    }
     
    8080
    8181    /**
    82      * Test {@link ColorProperty#getChildColor(String)}
     82     * Test {@link NamedColorProperty#getChildColor(String)}
    8383     */
    8484    @Test
Note: See TracChangeset for help on using the changeset viewer.