Changeset 14138 in josm for trunk/test/unit
- Timestamp:
- 2018-08-12T02:21:19+02:00 (6 years ago)
- Location:
- trunk/test/unit/org/openstreetmap/josm
- Files:
-
- 86 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/test/unit/org/openstreetmap/josm/JOSMFixture.java
r14125 r14138 31 31 import org.openstreetmap.josm.tools.JosmRuntimeException; 32 32 import org.openstreetmap.josm.tools.Logging; 33 import org.openstreetmap.josm.tools.PlatformManager; 33 34 import org.openstreetmap.josm.tools.date.DateUtils; 34 35 … … 108 109 I18n.init(); 109 110 // initialize the plaform hook, and 110 Main.determinePlatformHook();111 111 // call the really early hook before we anything else 112 Main.platform.preStartupHook();112 PlatformManager.getPlatform().preStartupHook(); 113 113 114 114 Logging.setLogLevel(Logging.LEVEL_INFO); -
trunk/test/unit/org/openstreetmap/josm/MainTest.java
r14125 r14138 21 21 @Rule 22 22 @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD") 23 public JOSMTestRules test = new JOSMTestRules(). platform().https().devAPI().main().projection();23 public JOSMTestRules test = new JOSMTestRules().https().devAPI().main().projection(); 24 24 25 25 /** -
trunk/test/unit/org/openstreetmap/josm/actions/AddImageryLayerActionTest.java
r13733 r14138 33 33 @Rule 34 34 @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD") 35 public JOSMTestRules test = new JOSMTestRules().preferences(). platform().fakeAPI();35 public JOSMTestRules test = new JOSMTestRules().preferences().fakeAPI(); 36 36 37 37 /** -
trunk/test/unit/org/openstreetmap/josm/actions/CopyActionTest.java
r12636 r14138 47 47 @Rule 48 48 @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD") 49 public JOSMTestRules test = new JOSMTestRules().preferences(). platform().fakeAPI();49 public JOSMTestRules test = new JOSMTestRules().preferences().fakeAPI(); 50 50 51 51 /** -
trunk/test/unit/org/openstreetmap/josm/actions/CreateCircleActionTest.java
r12636 r14138 38 38 @Rule 39 39 @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD") 40 public JOSMTestRules test = new JOSMTestRules().p latform().projection().main();40 public JOSMTestRules test = new JOSMTestRules().projection().main(); 41 41 42 42 /** -
trunk/test/unit/org/openstreetmap/josm/actions/DeleteLayerActionTest.java
r12636 r14138 24 24 @Rule 25 25 @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD") 26 public JOSMTestRules test = new JOSMTestRules() .platform();26 public JOSMTestRules test = new JOSMTestRules(); 27 27 28 28 /** -
trunk/test/unit/org/openstreetmap/josm/actions/ExitActionTest.java
r14126 r14138 29 29 @Rule 30 30 @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD") 31 public JOSMTestRules test = new JOSMTestRules(). platform().main();31 public JOSMTestRules test = new JOSMTestRules().main(); 32 32 33 33 /** -
trunk/test/unit/org/openstreetmap/josm/actions/ExpertToggleActionTest.java
r11224 r14138 27 27 @Rule 28 28 @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD") 29 public JOSMTestRules test = new JOSMTestRules().preferences() .platform();29 public JOSMTestRules test = new JOSMTestRules().preferences(); 30 30 31 31 /** -
trunk/test/unit/org/openstreetmap/josm/actions/FullscreenToggleActionTest.java
r12562 r14138 17 17 @Rule 18 18 @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD") 19 public JOSMTestRules test = new JOSMTestRules(). platform().main();19 public JOSMTestRules test = new JOSMTestRules().main(); 20 20 21 21 /** -
trunk/test/unit/org/openstreetmap/josm/actions/JoinAreasActionTest.java
r13950 r14138 49 49 @Rule 50 50 @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD") 51 public JOSMTestRules test = new JOSMTestRules(). platform().main().projection();51 public JOSMTestRules test = new JOSMTestRules().main().projection(); 52 52 53 53 /** -
trunk/test/unit/org/openstreetmap/josm/actions/MergeLayerActionTest.java
r12636 r14138 26 26 @Rule 27 27 @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD") 28 public JOSMTestRules test = new JOSMTestRules(). platform().main();28 public JOSMTestRules test = new JOSMTestRules().main(); 29 29 30 30 private MergeLayerAction action; -
trunk/test/unit/org/openstreetmap/josm/actions/MergeNodesActionTest.java
r12849 r14138 28 28 @Rule 29 29 @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD") 30 public JOSMTestRules test = new JOSMTestRules().p latform().projection();30 public JOSMTestRules test = new JOSMTestRules().projection(); 31 31 32 32 /** -
trunk/test/unit/org/openstreetmap/josm/actions/PurgeActionTest.java
r12636 r14138 32 32 @Rule 33 33 @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD") 34 public JOSMTestRules test = new JOSMTestRules(). platform().main();34 public JOSMTestRules test = new JOSMTestRules().main(); 35 35 36 36 /** -
trunk/test/unit/org/openstreetmap/josm/actions/SessionSaveAsActionTest.java
r11109 r14138 20 20 @Rule 21 21 @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD") 22 public JOSMTestRules test = new JOSMTestRules() .platform();22 public JOSMTestRules test = new JOSMTestRules(); 23 23 24 24 /** -
trunk/test/unit/org/openstreetmap/josm/actions/UnJoinNodeWayActionTest.java
r12636 r14138 42 42 @Rule 43 43 @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD") 44 public JOSMTestRules test = new JOSMTestRules() .platform();44 public JOSMTestRules test = new JOSMTestRules(); 45 45 46 46 /** -
trunk/test/unit/org/openstreetmap/josm/actions/mapmode/AddNoteActionTest.java
r14101 r14138 26 26 @Rule 27 27 @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD") 28 public JOSMTestRules test = new JOSMTestRules(). platform().main().projection();28 public JOSMTestRules test = new JOSMTestRules().main().projection(); 29 29 30 30 /** -
trunk/test/unit/org/openstreetmap/josm/actions/mapmode/DeleteActionTest.java
r12636 r14138 27 27 @Rule 28 28 @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD") 29 public JOSMTestRules test = new JOSMTestRules(). platform().main().projection();29 public JOSMTestRules test = new JOSMTestRules().main().projection(); 30 30 31 31 /** -
trunk/test/unit/org/openstreetmap/josm/actions/mapmode/DrawActionTest.java
r14134 r14138 40 40 @Rule 41 41 @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD") 42 public JOSMTestRules test = new JOSMTestRules(). platform().main().projection().timeout(20000);42 public JOSMTestRules test = new JOSMTestRules().main().projection().timeout(20000); 43 43 44 44 /** -
trunk/test/unit/org/openstreetmap/josm/actions/mapmode/ExtrudeActionTest.java
r12636 r14138 27 27 @Rule 28 28 @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD") 29 public JOSMTestRules test = new JOSMTestRules(). platform().platform().main().projection();29 public JOSMTestRules test = new JOSMTestRules().main().projection(); 30 30 31 31 /** -
trunk/test/unit/org/openstreetmap/josm/actions/mapmode/ImproveWayAccuracyActionTest.java
r12636 r14138 27 27 @Rule 28 28 @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD") 29 public JOSMTestRules test = new JOSMTestRules(). platform().platform().main().projection();29 public JOSMTestRules test = new JOSMTestRules().main().projection(); 30 30 31 31 /** -
trunk/test/unit/org/openstreetmap/josm/actions/mapmode/ParallelWayActionTest.java
r12636 r14138 28 28 @Rule 29 29 @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD") 30 public JOSMTestRules test = new JOSMTestRules(). platform().platform().main().projection();30 public JOSMTestRules test = new JOSMTestRules().main().projection(); 31 31 32 32 /** -
trunk/test/unit/org/openstreetmap/josm/actions/mapmode/PlayHeadDragModeTest.java
r12636 r14138 26 26 @Rule 27 27 @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD") 28 public JOSMTestRules test = new JOSMTestRules(). platform().platform().main().projection();28 public JOSMTestRules test = new JOSMTestRules().main().projection(); 29 29 30 30 /** -
trunk/test/unit/org/openstreetmap/josm/actions/mapmode/SelectActionTest.java
r12849 r14138 60 60 @Rule 61 61 @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD") 62 public JOSMTestRules test = new JOSMTestRules().p latform().projection().main();62 public JOSMTestRules test = new JOSMTestRules().projection().main(); 63 63 64 64 /** -
trunk/test/unit/org/openstreetmap/josm/actions/upload/ValidateUploadHookTest.java
r13496 r14138 21 21 @Rule 22 22 @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD") 23 public JOSMTestRules test = new JOSMTestRules(). platform().fakeAPI().timeout(30000);23 public JOSMTestRules test = new JOSMTestRules().fakeAPI().timeout(30000); 24 24 25 25 /** -
trunk/test/unit/org/openstreetmap/josm/command/conflict/ConflictAddCommandTest.java
r13616 r14138 33 33 @Rule 34 34 @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD") 35 public JOSMTestRules test = new JOSMTestRules() .platform();35 public JOSMTestRules test = new JOSMTestRules(); 36 36 private CommandTestData testData; 37 37 -
trunk/test/unit/org/openstreetmap/josm/command/conflict/CoordinateConflictResolveCommandTest.java
r13079 r14138 37 37 @Rule 38 38 @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD") 39 public JOSMTestRules test = new JOSMTestRules() .platform();39 public JOSMTestRules test = new JOSMTestRules(); 40 40 41 41 /** -
trunk/test/unit/org/openstreetmap/josm/data/PreferencesTest.java
r12989 r14138 21 21 @Rule 22 22 @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD") 23 public JOSMTestRules test = new JOSMTestRules().p latform().preferences().fakeAPI();23 public JOSMTestRules test = new JOSMTestRules().preferences().fakeAPI(); 24 24 25 25 /** -
trunk/test/unit/org/openstreetmap/josm/data/imagery/WMSEndpointTileSourceTest.java
r14120 r14138 30 30 @Rule 31 31 @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD") 32 public JOSMTestRules test = new JOSMTestRules().p latform().projection();32 public JOSMTestRules test = new JOSMTestRules().projection(); 33 33 34 34 @Rule -
trunk/test/unit/org/openstreetmap/josm/data/imagery/WMTSTileSourceTest.java
r14120 r14138 47 47 @ClassRule 48 48 @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD") 49 public static JOSMTestRules test = new JOSMTestRules().preferences().p latform().projection().timeout((int) TimeUnit.MINUTES.toMillis(5));49 public static JOSMTestRules test = new JOSMTestRules().preferences().projection().timeout((int) TimeUnit.MINUTES.toMillis(5)); 50 50 51 51 @Rule -
trunk/test/unit/org/openstreetmap/josm/data/osm/DefaultNameFormatterTest.java
r13766 r14138 38 38 @Rule 39 39 @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD") 40 public JOSMTestRules test = new JOSMTestRules() .platform();40 public JOSMTestRules test = new JOSMTestRules(); 41 41 42 42 /** -
trunk/test/unit/org/openstreetmap/josm/data/projection/ProjectionRefTest.java
r13707 r14138 35 35 import org.junit.Rule; 36 36 import org.junit.Test; 37 import org.openstreetmap.josm.Main;38 37 import org.openstreetmap.josm.data.Bounds; 39 38 import org.openstreetmap.josm.data.coor.EastNorth; … … 42 41 import org.openstreetmap.josm.testutils.JOSMTestRules; 43 42 import org.openstreetmap.josm.tools.Pair; 43 import org.openstreetmap.josm.tools.PlatformManager; 44 44 import org.openstreetmap.josm.tools.Utils; 45 45 … … 90 90 @Rule 91 91 @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD") 92 public JOSMTestRules test = new JOSMTestRules().p latform().projectionNadGrids().timeout(90_000);92 public JOSMTestRules test = new JOSMTestRules().projectionNadGrids().timeout(90_000); 93 93 94 94 /** … … 104 104 } 105 105 } 106 Main.determinePlatformHook();107 106 Collection<RefEntry> refs = readData(); 108 107 refs = updateData(refs); … … 286 285 // see http://geodesie.ign.fr/contenu/fichiers/documentation/algorithmes/notice/NT111_V1_HARMEL_TransfoNTF-RGF93_FormatGrilleNTV2.pdf 287 286 def = def.replace("ntf_r93_b.gsb", "ntf_r93.gsb"); 288 if ( Main.isPlatformWindows()) {287 if (PlatformManager.isPlatformWindows()) { 289 288 def = def.replace("'", "\\'").replace("\"", "\\\""); 290 289 } -
trunk/test/unit/org/openstreetmap/josm/data/projection/SwissGridTest.java
r14120 r14138 26 26 @Rule 27 27 @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD") 28 public JOSMTestRules test = new JOSMTestRules().projectionNadGrids() .platform();28 public JOSMTestRules test = new JOSMTestRules().projectionNadGrids(); 29 29 30 30 /** -
trunk/test/unit/org/openstreetmap/josm/data/validation/OsmValidatorTest.java
r11921 r14138 19 19 @Rule 20 20 @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD") 21 public JOSMTestRules test = new JOSMTestRules() .platform();21 public JOSMTestRules test = new JOSMTestRules(); 22 22 23 23 /** -
trunk/test/unit/org/openstreetmap/josm/data/validation/tests/MapCSSTagCheckerTest.java
r13616 r14138 52 52 @Rule 53 53 @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD") 54 public JOSMTestRules test = new JOSMTestRules().projection() .platform();54 public JOSMTestRules test = new JOSMTestRules().projection(); 55 55 56 56 static MapCSSTagChecker buildTagChecker(String css) throws ParseException { -
trunk/test/unit/org/openstreetmap/josm/data/validation/tests/MultipolygonTestTest.java
r12568 r14138 35 35 @Rule 36 36 @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD") 37 public JOSMTestRules test = new JOSMTestRules().projection().mapStyles().presets().main() .platform();37 public JOSMTestRules test = new JOSMTestRules().projection().mapStyles().presets().main(); 38 38 39 39 private static Way createUnclosedWay(String tags) { -
trunk/test/unit/org/openstreetmap/josm/gui/MainApplicationTest.java
r13812 r14138 28 28 import org.junit.Rule; 29 29 import org.junit.Test; 30 import org.openstreetmap.josm.Main;31 30 import org.openstreetmap.josm.TestUtils; 32 31 import org.openstreetmap.josm.actions.AboutAction; … … 44 43 import org.openstreetmap.josm.testutils.JOSMTestRules; 45 44 import org.openstreetmap.josm.tools.Logging; 45 import org.openstreetmap.josm.tools.PlatformManager; 46 46 import org.openstreetmap.josm.tools.Shortcut; 47 47 … … 196 196 public void testSetupUIManager() { 197 197 MainApplication.setupUIManager(); 198 assertEquals(Config.getPref().get("laf", Main.platform.getDefaultStyle()), UIManager.getLookAndFeel().getClass().getCanonicalName()); 198 assertEquals(Config.getPref().get("laf", PlatformManager.getPlatform().getDefaultStyle()), 199 UIManager.getLookAndFeel().getClass().getCanonicalName()); 199 200 } 200 201 -
trunk/test/unit/org/openstreetmap/josm/gui/MapScalerTest.java
r12636 r14138 28 28 @Rule 29 29 @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD") 30 public JOSMTestRules test = new JOSMTestRules().main().p latform().projection();30 public JOSMTestRules test = new JOSMTestRules().main().projection(); 31 31 32 32 /** -
trunk/test/unit/org/openstreetmap/josm/gui/NavigatableComponentTest.java
r14120 r14138 56 56 @Rule 57 57 @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD") 58 public JOSMTestRules test = new JOSMTestRules().preferences().p latform().projection();58 public JOSMTestRules test = new JOSMTestRules().preferences().projection(); 59 59 60 60 /** -
trunk/test/unit/org/openstreetmap/josm/gui/TableCellRendererTest.java
r14102 r14138 53 53 @Rule 54 54 @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD") 55 public JOSMTestRules test = new JOSMTestRules(). platform().main();55 public JOSMTestRules test = new JOSMTestRules().main(); 56 56 57 57 /** -
trunk/test/unit/org/openstreetmap/josm/gui/datatransfer/OsmTransferHandlerTest.java
r14120 r14138 29 29 @Rule 30 30 @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD") 31 public JOSMTestRules test = new JOSMTestRules().preferences().projection().main() .platform();31 public JOSMTestRules test = new JOSMTestRules().preferences().projection().main(); 32 32 33 33 private final OsmTransferHandler transferHandler = new OsmTransferHandler(); -
trunk/test/unit/org/openstreetmap/josm/gui/dialogs/CommandStackDialogTest.java
r14134 r14138 28 28 @Rule 29 29 @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD") 30 public JOSMTestRules test = new JOSMTestRules().main().p latform().projection();30 public JOSMTestRules test = new JOSMTestRules().main().projection(); 31 31 32 32 /** -
trunk/test/unit/org/openstreetmap/josm/gui/dialogs/ConflictDialogTest.java
r12636 r14138 33 33 @Rule 34 34 @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD") 35 public JOSMTestRules test = new JOSMTestRules().main().p latform().projection();35 public JOSMTestRules test = new JOSMTestRules().main().projection(); 36 36 37 37 /** -
trunk/test/unit/org/openstreetmap/josm/gui/dialogs/InspectPrimitiveDialogTest.java
r13169 r14138 31 31 @Rule 32 32 @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD") 33 public JOSMTestRules test = new JOSMTestRules().main().p latform().projection().mapStyles();33 public JOSMTestRules test = new JOSMTestRules().main().projection().mapStyles(); 34 34 35 35 /** -
trunk/test/unit/org/openstreetmap/josm/gui/dialogs/MapPaintDialogTest.java
r12636 r14138 21 21 @Rule 22 22 @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD") 23 public JOSMTestRules test = new JOSMTestRules().main().p latform().projection();23 public JOSMTestRules test = new JOSMTestRules().main().projection(); 24 24 25 25 /** -
trunk/test/unit/org/openstreetmap/josm/gui/dialogs/MinimapDialogTest.java
r14122 r14138 58 58 @Rule 59 59 @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD") 60 public JOSMTestRules josmTestRules = new JOSMTestRules().main().p latform().projection().fakeImagery();60 public JOSMTestRules josmTestRules = new JOSMTestRules().main().projection().fakeImagery(); 61 61 62 62 /** -
trunk/test/unit/org/openstreetmap/josm/gui/dialogs/changeset/ChangesetCacheManagerTest.java
r13846 r14138 33 33 @Rule 34 34 @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD") 35 public JOSMTestRules test = new JOSMTestRules().preferences() .platform();35 public JOSMTestRules test = new JOSMTestRules().preferences(); 36 36 37 37 /** -
trunk/test/unit/org/openstreetmap/josm/gui/dialogs/layer/LayerVisibilityActionTest.java
r12636 r14138 26 26 @Rule 27 27 @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD") 28 public JOSMTestRules test = new JOSMTestRules().preferences().projection(). platform().main();28 public JOSMTestRules test = new JOSMTestRules().preferences().projection().main(); 29 29 30 30 /** -
trunk/test/unit/org/openstreetmap/josm/gui/dialogs/relation/GenericRelationEditorTest.java
r14031 r14138 34 34 @Rule 35 35 @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD") 36 public JOSMTestRules test = new JOSMTestRules().preferences(). platform().main();36 public JOSMTestRules test = new JOSMTestRules().preferences().main(); 37 37 38 38 /** -
trunk/test/unit/org/openstreetmap/josm/gui/dialogs/relation/actions/AbstractRelationEditorActionTest.java
r14028 r14138 38 38 @Rule 39 39 @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD") 40 public JOSMTestRules test = new JOSMTestRules().preferences(). platform().main();40 public JOSMTestRules test = new JOSMTestRules().preferences().main(); 41 41 42 42 protected OsmDataLayer layer; -
trunk/test/unit/org/openstreetmap/josm/gui/help/HelpBrowserTest.java
r12248 r14138 26 26 @Rule 27 27 @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD") 28 public JOSMTestRules test = new JOSMTestRules().preferences(). platform().https();28 public JOSMTestRules test = new JOSMTestRules().preferences().https(); 29 29 30 30 static IHelpBrowser newHelpBrowser() { -
trunk/test/unit/org/openstreetmap/josm/gui/layer/AbstractTileSourceLayerTest.java
r13884 r14138 46 46 @Rule 47 47 @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD") 48 public JOSMTestRules test = new JOSMTestRules().p latform().projection().main();48 public JOSMTestRules test = new JOSMTestRules().projection().main(); 49 49 50 50 private static final class TMSTileStubSource extends AbstractTMSTileSource { -
trunk/test/unit/org/openstreetmap/josm/gui/layer/AutosaveTaskTest.java
r13116 r14138 41 41 @Rule 42 42 @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD") 43 public JOSMTestRules test = new JOSMTestRules().preferences().p latform().projection();43 public JOSMTestRules test = new JOSMTestRules().preferences().projection(); 44 44 45 45 private AutosaveTask task; -
trunk/test/unit/org/openstreetmap/josm/gui/layer/GpxLayerTest.java
r13211 r14138 41 41 @Rule 42 42 @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD") 43 public JOSMTestRules test = new JOSMTestRules(). platform().main().projection().i18n();43 public JOSMTestRules test = new JOSMTestRules().main().projection().i18n(); 44 44 45 45 private static String getHtml(GpxLayer layer) { -
trunk/test/unit/org/openstreetmap/josm/gui/layer/OsmDataLayerTest.java
r14075 r14138 49 49 @Rule 50 50 @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD") 51 public JOSMTestRules test = new JOSMTestRules().p latform().projection().main();51 public JOSMTestRules test = new JOSMTestRules().projection().main(); 52 52 53 53 private DataSet ds; -
trunk/test/unit/org/openstreetmap/josm/gui/layer/TMSLayerTest.java
r12636 r14138 23 23 @Rule 24 24 @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD") 25 public JOSMTestRules test = new JOSMTestRules().main().p latform().projection();25 public JOSMTestRules test = new JOSMTestRules().main().projection(); 26 26 27 27 /** -
trunk/test/unit/org/openstreetmap/josm/gui/layer/ValidatorLayerTest.java
r13174 r14138 25 25 @Rule 26 26 @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD") 27 public JOSMTestRules test = new JOSMTestRules().p latform().projection().main();27 public JOSMTestRules test = new JOSMTestRules().projection().main(); 28 28 29 29 /** -
trunk/test/unit/org/openstreetmap/josm/gui/layer/WMSLayerTest.java
r12636 r14138 23 23 @Rule 24 24 @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD") 25 public JOSMTestRules test = new JOSMTestRules().main().p latform().projection();25 public JOSMTestRules test = new JOSMTestRules().main().projection(); 26 26 27 27 /** -
trunk/test/unit/org/openstreetmap/josm/gui/layer/gpx/ChooseTrackVisibilityActionTest.java
r12564 r14138 19 19 @Rule 20 20 @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD") 21 public JOSMTestRules test = new JOSMTestRules() .platform();21 public JOSMTestRules test = new JOSMTestRules(); 22 22 23 23 /** -
trunk/test/unit/org/openstreetmap/josm/gui/layer/gpx/DownloadAlongTrackActionTest.java
r14062 r14138 32 32 @Rule 33 33 @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD") 34 public JOSMTestRules test = new JOSMTestRules().preferences() .platform();34 public JOSMTestRules test = new JOSMTestRules().preferences(); 35 35 36 36 private static PleaseWaitRunnable createTask(String file) throws Exception { -
trunk/test/unit/org/openstreetmap/josm/gui/layer/gpx/DownloadWmsAlongTrackActionTest.java
r14132 r14138 30 30 @Rule 31 31 @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD") 32 public JOSMTestRules test = new JOSMTestRules(). platform().main().projection().fakeImagery().timeout(20000);32 public JOSMTestRules test = new JOSMTestRules().main().projection().fakeImagery().timeout(20000); 33 33 34 34 /** -
trunk/test/unit/org/openstreetmap/josm/gui/layer/markerlayer/MarkerLayerTest.java
r12849 r14138 33 33 @Rule 34 34 @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD") 35 public JOSMTestRules test = new JOSMTestRules().main().p latform().preferences().projection();35 public JOSMTestRules test = new JOSMTestRules().main().preferences().projection(); 36 36 37 37 /** -
trunk/test/unit/org/openstreetmap/josm/gui/preferences/imagery/AddWMSLayerPanelTest.java
r13734 r14138 20 20 @Rule 21 21 @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD") 22 public JOSMTestRules test = new JOSMTestRules().p latform().preferences();22 public JOSMTestRules test = new JOSMTestRules().preferences(); 23 23 24 24 /** -
trunk/test/unit/org/openstreetmap/josm/gui/preferences/imagery/ImageryPreferenceTest.java
r12849 r14138 26 26 @Rule 27 27 @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD") 28 public JOSMTestRules test = new JOSMTestRules(). platform().main();28 public JOSMTestRules test = new JOSMTestRules().main(); 29 29 30 30 /** -
trunk/test/unit/org/openstreetmap/josm/gui/preferences/plugin/PluginPreferenceHighLevelTest.java
r14081 r14138 52 52 public JOSMTestRules test = new JOSMTestRules().assumeRevision( 53 53 "Revision: 10000\n" 54 ).preferences().main().assertionsInEDT() .platform();54 ).preferences().main().assertionsInEDT(); 55 55 56 56 /** -
trunk/test/unit/org/openstreetmap/josm/gui/preferences/plugin/PluginPreferenceTest.java
r14052 r14138 34 34 @Rule 35 35 @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD") 36 public JOSMTestRules test = new JOSMTestRules().preferences().assertionsInEDT() .platform();36 public JOSMTestRules test = new JOSMTestRules().preferences().assertionsInEDT(); 37 37 38 38 /** -
trunk/test/unit/org/openstreetmap/josm/gui/preferences/server/AuthenticationPreferenceTest.java
r10979 r14138 21 21 @Rule 22 22 @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD") 23 public JOSMTestRules test = new JOSMTestRules().preferences() .platform();23 public JOSMTestRules test = new JOSMTestRules().preferences(); 24 24 25 25 /** -
trunk/test/unit/org/openstreetmap/josm/gui/preferences/server/OverpassServerPreferenceTest.java
r10979 r14138 21 21 @Rule 22 22 @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD") 23 public JOSMTestRules test = new JOSMTestRules().preferences() .platform();23 public JOSMTestRules test = new JOSMTestRules().preferences(); 24 24 25 25 /** -
trunk/test/unit/org/openstreetmap/josm/gui/preferences/server/ProxyPreferenceTest.java
r10979 r14138 21 21 @Rule 22 22 @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD") 23 public JOSMTestRules test = new JOSMTestRules().preferences() .platform();23 public JOSMTestRules test = new JOSMTestRules().preferences(); 24 24 25 25 /** -
trunk/test/unit/org/openstreetmap/josm/gui/preferences/server/ServerAccessPreferenceTest.java
r10979 r14138 21 21 @Rule 22 22 @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD") 23 public JOSMTestRules test = new JOSMTestRules().preferences() .platform();23 public JOSMTestRules test = new JOSMTestRules().preferences(); 24 24 25 25 /** -
trunk/test/unit/org/openstreetmap/josm/gui/tagging/presets/TaggingPresetReaderTest.java
r11921 r14138 33 33 @Rule 34 34 @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD") 35 public JOSMTestRules test = new JOSMTestRules() .platform();35 public JOSMTestRules test = new JOSMTestRules(); 36 36 37 37 /** -
trunk/test/unit/org/openstreetmap/josm/io/CertificateAmendmentTestIT.java
r14099 r14138 25 25 @Rule 26 26 @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD") 27 public JOSMTestRules test = new JOSMTestRules(). platform().https().timeout(20000);27 public JOSMTestRules test = new JOSMTestRules().https().timeout(20000); 28 28 29 29 /** -
trunk/test/unit/org/openstreetmap/josm/io/NetworkManagerTest.java
r14121 r14138 26 26 @Rule 27 27 @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD") 28 public JOSMTestRules test = new JOSMTestRules(). platform().https().devAPI().main().projection();28 public JOSMTestRules test = new JOSMTestRules().https().devAPI().main().projection(); 29 29 30 30 /** -
trunk/test/unit/org/openstreetmap/josm/io/imagery/WMSImageryTest.java
r13878 r14138 32 32 @Rule 33 33 @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD") 34 public JOSMTestRules test = new JOSMTestRules().p latform().projection();34 public JOSMTestRules test = new JOSMTestRules().projection(); 35 35 36 36 @Rule -
trunk/test/unit/org/openstreetmap/josm/io/remotecontrol/handler/ImageryHandlerTest.java
r12558 r14138 26 26 @Rule 27 27 @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD") 28 public JOSMTestRules test = new JOSMTestRules() .platform();28 public JOSMTestRules test = new JOSMTestRules(); 29 29 30 30 private static ImageryHandler newHandler(String url) throws RequestHandlerBadRequestException { -
trunk/test/unit/org/openstreetmap/josm/io/session/SessionReaderTest.java
r13243 r14138 37 37 @Rule 38 38 @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD") 39 public JOSMTestRules test = new JOSMTestRules().p latform().projection();39 public JOSMTestRules test = new JOSMTestRules().projection(); 40 40 41 41 private static String getSessionDataDir() { -
trunk/test/unit/org/openstreetmap/josm/io/session/SessionWriterTest.java
r14120 r14138 89 89 @Rule 90 90 @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD") 91 public JOSMTestRules test = new JOSMTestRules().p latform().projection().main();91 public JOSMTestRules test = new JOSMTestRules().projection().main(); 92 92 93 93 /** -
trunk/test/unit/org/openstreetmap/josm/plugins/PluginHandlerTest.java
r13079 r14138 34 34 @Rule 35 35 @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD") 36 public JOSMTestRules test = new JOSMTestRules() .platform();36 public JOSMTestRules test = new JOSMTestRules(); 37 37 38 38 /** -
trunk/test/unit/org/openstreetmap/josm/plugins/PluginHandlerTestIT.java
r14113 r14138 42 42 @Rule 43 43 @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD") 44 public JOSMTestRules test = new JOSMTestRules(). platform().main().projection().preferences().timeout(10*60*1000);44 public JOSMTestRules test = new JOSMTestRules().main().projection().preferences().timeout(10*60*1000); 45 45 46 46 /** -
trunk/test/unit/org/openstreetmap/josm/spi/lifecycle/LifecycleTest.java
r14125 r14138 21 21 @Rule 22 22 @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD") 23 public JOSMTestRules test = new JOSMTestRules(). platform().https().devAPI().main().projection();23 public JOSMTestRules test = new JOSMTestRules().https().devAPI().main().projection(); 24 24 25 25 private static class InitStatusListenerStub implements InitStatusListener { -
trunk/test/unit/org/openstreetmap/josm/testutils/JOSMTestRules.java
r14120 r14138 79 79 private Runnable navigableComponentMockingRunnable; 80 80 private Runnable edtAssertionMockingRunnable; 81 private boolean platform;82 81 private boolean useProjection; 83 82 private boolean useProjectionNadGrids; … … 150 149 * Enable {@link Main#platform} global variable. 151 150 * @return this instance, for easy chaining 152 */ 151 * @deprecated Not needed anymore 152 */ 153 @Deprecated 153 154 public JOSMTestRules platform() { 154 platform = true;155 155 return this; 156 156 } … … 209 209 public JOSMTestRules https() { 210 210 useHttps = true; 211 platform = true;212 211 return this; 213 212 } … … 457 456 // We force the use of a wrong API server, just in case anyone attempts an upload 458 457 Config.getPref().put("osm-server.url", "http://invalid"); 459 }460 461 // Set Platform462 if (platform) {463 Main.determinePlatformHook();464 458 } 465 459 … … 550 544 cleanLayerEnvironment(); 551 545 Main.pref.resetToInitialState(); 552 Main.platform = null;553 546 System.gc(); 554 547 } … … 592 585 ProjectionRegistry.clearProjectionChangeListeners(); 593 586 Main.pref.resetToInitialState(); 594 Main.platform = null;595 587 596 588 if (this.assumeRevisionString != null && this.originalVersion != null) { -
trunk/test/unit/org/openstreetmap/josm/tools/KeyboardUtilsTest.java
r14026 r14138 26 26 @Rule 27 27 @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD") 28 public JOSMTestRules rules = new JOSMTestRules() .platform();28 public JOSMTestRules rules = new JOSMTestRules(); 29 29 30 30 /** -
trunk/test/unit/org/openstreetmap/josm/tools/PlatformHookOsxTest.java
r14119 r14138 14 14 import org.junit.Test; 15 15 import org.openstreetmap.josm.JOSMFixture; 16 import org.openstreetmap.josm.Main;17 16 import org.openstreetmap.josm.spi.preferences.Config; 18 17 … … 64 63 @Test 65 64 public void testOpenUrl() throws IOException { 66 if (! Main.isPlatformWindows()) {65 if (!PlatformManager.isPlatformWindows()) { 67 66 hook.openUrl(Config.getUrls().getJOSMWebsite()); 68 67 } else { … … 83 82 File cache = hook.getDefaultCacheDirectory(); 84 83 assertNotNull(cache); 85 if ( Main.isPlatformOsx()) {84 if (PlatformManager.isPlatformOsx()) { 86 85 assertTrue(cache.toString().contains("/Library/")); 87 86 } … … 95 94 File cache = hook.getDefaultPrefDirectory(); 96 95 assertNotNull(cache); 97 if ( Main.isPlatformOsx()) {96 if (PlatformManager.isPlatformOsx()) { 98 97 assertTrue(cache.toString().contains("/Library/")); 99 98 } … … 114 113 public void testGetOSDescription() { 115 114 String os = hook.getOSDescription(); 116 if ( Main.isPlatformOsx()) {115 if (PlatformManager.isPlatformOsx()) { 117 116 assertTrue(os.contains("Mac")); 118 117 } else { -
trunk/test/unit/org/openstreetmap/josm/tools/PlatformHookWindowsTest.java
r14119 r14138 19 19 import org.junit.Test; 20 20 import org.openstreetmap.josm.JOSMFixture; 21 import org.openstreetmap.josm.Main;22 21 import org.openstreetmap.josm.io.remotecontrol.RemoteControlHttpsServer; 23 22 import org.openstreetmap.josm.io.remotecontrol.RemoteControlTest; … … 54 53 @Test 55 54 public void testGetRootKeystore() throws Exception { 56 if ( Main.isPlatformWindows()) {55 if (PlatformManager.isPlatformWindows()) { 57 56 assertNotNull(PlatformHookWindows.getRootKeystore()); 58 57 } else { … … 72 71 @Test 73 72 public void testRemoveInsecureCertificates() throws Exception { 74 if ( Main.isPlatformWindows()) {73 if (PlatformManager.isPlatformWindows()) { 75 74 PlatformHookWindows.removeInsecureCertificates(); 76 75 } else { … … 93 92 KeyStore ks = RemoteControlHttpsServer.loadJosmKeystore(); 94 93 TrustedCertificateEntry trustedCert = new KeyStore.TrustedCertificateEntry(ks.getCertificate(ks.aliases().nextElement())); 95 if ( Main.isPlatformWindows()) {94 if (PlatformManager.isPlatformWindows()) { 96 95 hook.setupHttpsCertificate(RemoteControlHttpsServer.ENTRY_ALIAS, trustedCert); 97 96 } else { … … 119 118 @Test 120 119 public void testOpenUrl() throws IOException { 121 if ( Main.isPlatformWindows()) {120 if (PlatformManager.isPlatformWindows()) { 122 121 hook.openUrl(Config.getUrls().getJOSMWebsite()); 123 122 } else { … … 146 145 File cache = hook.getDefaultCacheDirectory(); 147 146 assertNotNull(cache); 148 if ( Main.isPlatformWindows()) {147 if (PlatformManager.isPlatformWindows()) { 149 148 assertTrue(cache.toString().contains(":")); 150 149 } … … 158 157 File cache = hook.getDefaultPrefDirectory(); 159 158 assertNotNull(cache); 160 if ( Main.isPlatformWindows()) {159 if (PlatformManager.isPlatformWindows()) { 161 160 assertTrue(cache.toString().contains(":")); 162 161 } … … 177 176 public void testGetInstalledFonts() { 178 177 Collection<String> fonts = hook.getInstalledFonts(); 179 if ( Main.isPlatformWindows()) {178 if (PlatformManager.isPlatformWindows()) { 180 179 assertFalse(fonts.isEmpty()); 181 180 } else { … … 190 189 public void testGetOSDescription() { 191 190 String os = hook.getOSDescription(); 192 if ( Main.isPlatformWindows()) {191 if (PlatformManager.isPlatformWindows()) { 193 192 assertTrue(os.contains("Windows")); 194 193 } else { -
trunk/test/unit/org/openstreetmap/josm/tools/RightAndLefthandTrafficTest.java
r12556 r14138 21 21 @Rule 22 22 @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD") 23 public JOSMTestRules rules = new JOSMTestRules().p latform().projection().rlTraffic();23 public JOSMTestRules rules = new JOSMTestRules().projection().rlTraffic(); 24 24 25 25 /** -
trunk/test/unit/org/openstreetmap/josm/tools/TerritoriesTest.java
r12802 r14138 21 21 @Rule 22 22 @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD") 23 public JOSMTestRules rules = new JOSMTestRules().p latform().projection().territories();23 public JOSMTestRules rules = new JOSMTestRules().projection().territories(); 24 24 25 25 /** -
trunk/test/unit/org/openstreetmap/josm/tools/bugreport/BugReportTest.java
r12779 r14138 27 27 @Rule 28 28 @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD") 29 public JOSMTestRules test = new JOSMTestRules().preferences() .platform();29 public JOSMTestRules test = new JOSMTestRules().preferences(); 30 30 31 31 /**
Note:
See TracChangeset
for help on using the changeset viewer.