Changeset 12558 in josm for trunk/test/unit/org
- Timestamp:
- 2017-08-02T21:45:32+02:00 (7 years ago)
- Location:
- trunk/test/unit/org/openstreetmap/josm
- Files:
-
- 11 edited
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/test/unit/org/openstreetmap/josm/actions/downloadtasks/AbstractDownloadTaskTestParent.java
r12557 r12558 18 18 * Superclass of {@link DownloadGpsTaskTest}, {@link DownloadOsmTaskTest} and {@link DownloadNotesTaskTest}. 19 19 */ 20 public abstract class AbstractDownloadTaskTest {20 public abstract class AbstractDownloadTaskTestParent { 21 21 22 22 /** -
trunk/test/unit/org/openstreetmap/josm/actions/downloadtasks/DownloadGpsTaskTest.java
r12557 r12558 14 14 * Unit tests for class {@link DownloadGpsTask}. 15 15 */ 16 public class DownloadGpsTaskTest extends AbstractDownloadTaskTest {16 public class DownloadGpsTaskTest extends AbstractDownloadTaskTestParent { 17 17 18 18 /** -
trunk/test/unit/org/openstreetmap/josm/actions/downloadtasks/DownloadNotesTaskTest.java
r12557 r12558 14 14 * Unit tests for class {@link DownloadNotesTask}. 15 15 */ 16 public class DownloadNotesTaskTest extends AbstractDownloadTaskTest {16 public class DownloadNotesTaskTest extends AbstractDownloadTaskTestParent { 17 17 18 18 /** -
trunk/test/unit/org/openstreetmap/josm/actions/downloadtasks/DownloadOsmTaskTest.java
r12557 r12558 14 14 * Unit tests for class {@link DownloadOsmTask}. 15 15 */ 16 public class DownloadOsmTaskTest extends AbstractDownloadTaskTest {16 public class DownloadOsmTaskTest extends AbstractDownloadTaskTestParent { 17 17 18 18 /** -
trunk/test/unit/org/openstreetmap/josm/io/remotecontrol/handler/AddNodeHandlerTest.java
r10973 r12558 2 2 package org.openstreetmap.josm.io.remotecontrol.handler; 3 3 4 import org.junit.BeforeClass;5 4 import org.junit.Rule; 6 5 import org.junit.Test; 7 6 import org.junit.rules.ExpectedException; 8 import org.openstreetmap.josm.JOSMFixture;9 7 import org.openstreetmap.josm.Main; 10 8 import org.openstreetmap.josm.data.osm.DataSet; 11 9 import org.openstreetmap.josm.gui.layer.OsmDataLayer; 12 10 import org.openstreetmap.josm.io.remotecontrol.handler.RequestHandler.RequestHandlerBadRequestException; 11 import org.openstreetmap.josm.testutils.JOSMTestRules; 12 13 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; 13 14 14 15 /** … … 26 27 * Setup test. 27 28 */ 28 @BeforeClass 29 public static void setUpBeforeClass() { 30 JOSMFixture.createUnitTestFixture().init(true); 31 } 29 @Rule 30 @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD") 31 public JOSMTestRules test = new JOSMTestRules(); 32 32 33 33 private static AddNodeHandler newHandler(String url) throws RequestHandlerBadRequestException { -
trunk/test/unit/org/openstreetmap/josm/io/remotecontrol/handler/AddWayHandlerTest.java
r10973 r12558 2 2 package org.openstreetmap.josm.io.remotecontrol.handler; 3 3 4 import org.junit.BeforeClass;5 4 import org.junit.Rule; 6 5 import org.junit.Test; 7 6 import org.junit.rules.ExpectedException; 8 import org.openstreetmap.josm.JOSMFixture;9 7 import org.openstreetmap.josm.Main; 10 8 import org.openstreetmap.josm.data.osm.DataSet; 11 9 import org.openstreetmap.josm.gui.layer.OsmDataLayer; 12 10 import org.openstreetmap.josm.io.remotecontrol.handler.RequestHandler.RequestHandlerBadRequestException; 11 import org.openstreetmap.josm.testutils.JOSMTestRules; 12 13 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; 13 14 14 15 /** … … 26 27 * Setup test. 27 28 */ 28 @BeforeClass 29 public static void setUpBeforeClass() { 30 JOSMFixture.createUnitTestFixture().init(true); 31 } 29 @Rule 30 @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD") 31 public JOSMTestRules test = new JOSMTestRules(); 32 32 33 33 private static AddWayHandler newHandler(String url) throws RequestHandlerBadRequestException { -
trunk/test/unit/org/openstreetmap/josm/io/remotecontrol/handler/ImageryHandlerTest.java
r10973 r12558 2 2 package org.openstreetmap.josm.io.remotecontrol.handler; 3 3 4 import org.junit.BeforeClass;5 4 import org.junit.Rule; 6 5 import org.junit.Test; 7 6 import org.junit.rules.ExpectedException; 8 import org.openstreetmap.josm.JOSMFixture;9 7 import org.openstreetmap.josm.io.remotecontrol.handler.RequestHandler.RequestHandlerBadRequestException; 8 import org.openstreetmap.josm.testutils.JOSMTestRules; 9 10 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; 10 11 11 12 /** … … 23 24 * Setup test. 24 25 */ 25 @BeforeClass 26 public static void setUpBeforeClass() { 27 JOSMFixture.createUnitTestFixture().init(true); 28 } 26 @Rule 27 @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD") 28 public JOSMTestRules test = new JOSMTestRules().platform(); 29 29 30 30 private static ImageryHandler newHandler(String url) throws RequestHandlerBadRequestException { -
trunk/test/unit/org/openstreetmap/josm/io/remotecontrol/handler/ImportHandlerTest.java
r10973 r12558 6 6 import java.io.File; 7 7 8 import org.junit.BeforeClass;9 8 import org.junit.Rule; 10 9 import org.junit.Test; 11 10 import org.junit.rules.ExpectedException; 12 import org.openstreetmap.josm.JOSMFixture;13 11 import org.openstreetmap.josm.Main; 14 12 import org.openstreetmap.josm.TestUtils; 15 13 import org.openstreetmap.josm.gui.layer.OsmDataLayer; 16 14 import org.openstreetmap.josm.io.remotecontrol.handler.RequestHandler.RequestHandlerBadRequestException; 15 import org.openstreetmap.josm.testutils.JOSMTestRules; 17 16 import org.openstreetmap.josm.tools.Utils; 17 18 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; 18 19 19 20 /** … … 31 32 * Setup test. 32 33 */ 33 @BeforeClass 34 public static void setUpBeforeClass() { 35 JOSMFixture.createUnitTestFixture().init(true); 36 } 34 @Rule 35 @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD") 36 public JOSMTestRules test = new JOSMTestRules().mainMenu(); 37 37 38 38 private static ImportHandler newHandler(String url) throws RequestHandlerBadRequestException { -
trunk/test/unit/org/openstreetmap/josm/io/remotecontrol/handler/LoadAndZoomHandlerTest.java
r10973 r12558 2 2 package org.openstreetmap.josm.io.remotecontrol.handler; 3 3 4 import org.junit.BeforeClass;5 4 import org.junit.Rule; 6 5 import org.junit.Test; 7 6 import org.junit.rules.ExpectedException; 8 import org.openstreetmap.josm.JOSMFixture;9 7 import org.openstreetmap.josm.io.remotecontrol.handler.RequestHandler.RequestHandlerBadRequestException; 8 import org.openstreetmap.josm.testutils.JOSMTestRules; 9 10 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; 10 11 11 12 /** … … 23 24 * Setup test. 24 25 */ 25 @BeforeClass 26 public static void setUpBeforeClass() { 27 JOSMFixture.createUnitTestFixture().init(true); 28 } 26 @Rule 27 @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD") 28 public JOSMTestRules test = new JOSMTestRules(); 29 29 30 30 private static LoadAndZoomHandler newHandler(String url) throws RequestHandlerBadRequestException { -
trunk/test/unit/org/openstreetmap/josm/io/remotecontrol/handler/LoadObjectHandlerTest.java
r10973 r12558 2 2 package org.openstreetmap.josm.io.remotecontrol.handler; 3 3 4 import org.junit.BeforeClass;5 4 import org.junit.Rule; 6 5 import org.junit.Test; 7 6 import org.junit.rules.ExpectedException; 8 import org.openstreetmap.josm.JOSMFixture;9 7 import org.openstreetmap.josm.io.remotecontrol.handler.RequestHandler.RequestHandlerBadRequestException; 8 import org.openstreetmap.josm.testutils.JOSMTestRules; 9 10 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; 10 11 11 12 /** … … 23 24 * Setup test. 24 25 */ 25 @BeforeClass 26 public static void setUpBeforeClass() { 27 JOSMFixture.createUnitTestFixture().init(true); 28 } 26 @Rule 27 @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD") 28 public JOSMTestRules test = new JOSMTestRules(); 29 29 30 30 private static LoadObjectHandler newHandler(String url) throws RequestHandlerBadRequestException { -
trunk/test/unit/org/openstreetmap/josm/io/remotecontrol/handler/RequestHandlerTest.java
r11621 r12558 8 8 import java.util.Map; 9 9 10 import org.junit.Rule; 10 11 import org.junit.Test; 11 12 import org.openstreetmap.josm.io.remotecontrol.PermissionPrefWithDefault; 12 13 import org.openstreetmap.josm.io.remotecontrol.handler.RequestHandler.RequestHandlerBadRequestException; 14 import org.openstreetmap.josm.testutils.JOSMTestRules; 15 16 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; 13 17 14 18 /** … … 16 20 */ 17 21 public class RequestHandlerTest { 22 23 /** 24 * Setup test. 25 */ 26 @Rule 27 @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD") 28 public JOSMTestRules test = new JOSMTestRules(); 18 29 19 30 Map<String, String> getRequestParameter(String url) throws RequestHandlerBadRequestException { -
trunk/test/unit/org/openstreetmap/josm/testutils/JOSMTestRules.java
r12557 r12558 215 215 * Use the {@link Main#main} application in this test. 216 216 * @return this instance, for easy chaining 217 * @since xxx217 * @since 12557 218 218 */ 219 219 public JOSMTestRules main() { … … 225 225 * Use the {@link Main#menu} in this test. 226 226 * @return this instance, for easy chaining 227 * @since xxx227 * @since 12557 228 228 */ 229 229 public JOSMTestRules mainMenu() { 230 230 main(); 231 platform(); 231 232 mainMenu = true; 232 233 return this;
Note:
See TracChangeset
for help on using the changeset viewer.