Changeset 12394 in josm for trunk


Ignore:
Timestamp:
2017-06-11T15:26:59+02:00 (7 years ago)
Author:
michael2402
Message:

Fix LayerVisibilityActionTest: It does require the laye rlist dialog, which requires shortcuts, so we need most of JOSM.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/test/unit/org/openstreetmap/josm/gui/dialogs/layer/LayerVisibilityActionTest.java

    r10467 r12394  
    66import static org.junit.Assert.assertTrue;
    77
     8import org.junit.BeforeClass;
    89import org.junit.Rule;
    910import org.junit.Test;
     11import org.openstreetmap.josm.JOSMFixture;
    1012import org.openstreetmap.josm.Main;
    1113import org.openstreetmap.josm.gui.dialogs.LayerListDialog;
     
    2729    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
    2830    public JOSMTestRules test = new JOSMTestRules().preferences().projection().platform();
     31
     32    /**
     33     * Somewhere deep down the dependencies we need shortcuts
     34     */
     35    @BeforeClass
     36    public static void setUp() {
     37        JOSMFixture.createUnitTestFixture().init(true);
     38    }
    2939
    3040    /**
     
    7080
    7181        // layer stays visible during adjust
    72         action.opacitySlider.setValueIsAdjusting(true);
     82        action.opacitySlider.slider.setValueIsAdjusting(true);
    7383        action.opacitySlider.setRealValue(0);
    7484        assertEquals(0, layer.getOpacity(), 1e-15);
     
    7787        layer.setOpacity(0);
    7888
    79         action.opacitySlider.setValueIsAdjusting(false);
     89        action.opacitySlider.slider.setValueIsAdjusting(false);
    8090        action.opacitySlider.setRealValue(0);
    8191        assertEquals(0, layer.getOpacity(), 1e-15);
Note: See TracChangeset for help on using the changeset viewer.