Ignore:
Timestamp:
2016-01-25T02:46:36+01:00 (5 years ago)
Author:
Don-vip
Message:

update/fix preferences unit tests, based on work from Mapillary plugin unit tests

Location:
trunk/test/unit/org/openstreetmap/josm/gui/preferences/display
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/test/unit/org/openstreetmap/josm/gui/preferences/display/ColorPreferenceTest.java

    r9622 r9624  
    77import org.junit.Test;
    88import org.openstreetmap.josm.JOSMFixture;
    9 import org.openstreetmap.josm.gui.preferences.PreferenceTabbedPane;
     9import org.openstreetmap.josm.gui.preferences.PreferencesTestUtils;
    1010
    1111/**
     
    3535    @Test
    3636    public void testAddGui() {
    37         new ColorPreference.Factory().createPreferenceSetting().addGui(new PreferenceTabbedPane());
     37        PreferencesTestUtils.testPreferenceSettingAddGui(new ColorPreference.Factory(), DisplayPreference.class);
    3838    }
    3939}
  • trunk/test/unit/org/openstreetmap/josm/gui/preferences/display/DisplayPreferenceTest.java

    r9622 r9624  
    77import org.junit.Test;
    88import org.openstreetmap.josm.JOSMFixture;
    9 import org.openstreetmap.josm.gui.preferences.PreferenceTabbedPane;
     9import org.openstreetmap.josm.gui.preferences.PreferencesTestUtils;
    1010
    1111/**
     
    3535    @Test
    3636    public void testAddGui() {
    37         new DisplayPreference.Factory().createPreferenceSetting().addGui(new PreferenceTabbedPane());
     37        PreferencesTestUtils.testPreferenceSettingAddGui(new DisplayPreference.Factory(), null);
    3838    }
    3939}
  • trunk/test/unit/org/openstreetmap/josm/gui/preferences/display/DrawingPreferenceTest.java

    r9622 r9624  
    77import org.junit.Test;
    88import org.openstreetmap.josm.JOSMFixture;
    9 import org.openstreetmap.josm.gui.preferences.PreferenceTabbedPane;
     9import org.openstreetmap.josm.gui.preferences.PreferencesTestUtils;
    1010
    1111/**
     
    3535    @Test
    3636    public void testAddGui() {
    37         new DrawingPreference.Factory().createPreferenceSetting().addGui(new PreferenceTabbedPane());
     37        PreferencesTestUtils.testPreferenceSettingAddGui(new DrawingPreference.Factory(), DisplayPreference.class);
    3838    }
    3939}
  • trunk/test/unit/org/openstreetmap/josm/gui/preferences/display/LafPreferenceTest.java

    r9622 r9624  
    77import org.junit.Test;
    88import org.openstreetmap.josm.JOSMFixture;
    9 import org.openstreetmap.josm.gui.preferences.PreferenceTabbedPane;
     9import org.openstreetmap.josm.gui.preferences.PreferencesTestUtils;
    1010
    1111/**
     
    3535    @Test
    3636    public void testAddGui() {
    37         new LafPreference.Factory().createPreferenceSetting().addGui(new PreferenceTabbedPane());
     37        PreferencesTestUtils.testPreferenceSettingAddGui(new LafPreference.Factory(), DisplayPreference.class);
    3838    }
    3939}
  • trunk/test/unit/org/openstreetmap/josm/gui/preferences/display/LanguagePreferenceTest.java

    r9622 r9624  
    77import org.junit.Test;
    88import org.openstreetmap.josm.JOSMFixture;
    9 import org.openstreetmap.josm.gui.preferences.PreferenceTabbedPane;
     9import org.openstreetmap.josm.gui.preferences.PreferencesTestUtils;
    1010
    1111/**
     
    3535    @Test
    3636    public void testAddGui() {
    37         new LanguagePreference.Factory().createPreferenceSetting().addGui(new PreferenceTabbedPane());
     37        PreferencesTestUtils.testPreferenceSettingAddGui(new LanguagePreference.Factory(), DisplayPreference.class);
    3838    }
    3939}
Note: See TracChangeset for help on using the changeset viewer.