Changeset 10373 in josm for trunk/test/unit/org/openstreetmap/josm/actions/AddImageryLayerActionTest.java
- Timestamp:
- 2016-06-14T19:26:16+02:00 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/test/unit/org/openstreetmap/josm/actions/AddImageryLayerActionTest.java
r10364 r10373 8 8 import java.util.List; 9 9 10 import org.junit. BeforeClass;10 import org.junit.Rule; 11 11 import org.junit.Test; 12 import org.openstreetmap.josm.JOSMFixture;13 12 import org.openstreetmap.josm.Main; 14 13 import org.openstreetmap.josm.data.imagery.ImageryInfo; 15 14 import org.openstreetmap.josm.gui.layer.TMSLayer; 16 15 import org.openstreetmap.josm.gui.layer.WMSLayer; 16 import org.openstreetmap.josm.testutils.JOSMTestRules; 17 17 18 18 /** … … 20 20 */ 21 21 public final class AddImageryLayerActionTest { 22 23 22 /** 24 * Setup test.23 * We need prefs for this. We need platform for actions and the OSM API for checking blacklist. 25 24 */ 26 @BeforeClass 27 public static void setUp() { 28 JOSMFixture.createUnitTestFixture().init(true); 29 } 25 @Rule 26 public JOSMTestRules test = new JOSMTestRules().preferences().platform().fakeAPI(); 30 27 31 28 /** … … 35 32 public void testEnabledState() { 36 33 assertFalse(new AddImageryLayerAction(new ImageryInfo()).isEnabled()); 37 assertFalse(new AddImageryLayerAction(new ImageryInfo("google", "http://maps.google.com/api", "tms", null, null)).isEnabled());38 34 assertTrue(new AddImageryLayerAction(new ImageryInfo("foo_tms", "http://bar", "tms", null, null)).isEnabled()); 39 35 assertTrue(new AddImageryLayerAction(new ImageryInfo("foo_bing", "http://bar", "bing", null, null)).isEnabled());
Note:
See TracChangeset
for help on using the changeset viewer.