Changeset 14138 in josm for trunk/test


Ignore:
Timestamp:
2018-08-12T02:21:19+02:00 (16 months ago)
Author:
Don-vip
Message:

see #15229 - deprecate Main.platform and related methods - new class PlatformManager

Location:
trunk/test
Files:
87 edited

Legend:

Unmodified
Added
Removed
  • trunk/test/functional/org/openstreetmap/josm/gui/mappaint/StyleCacheTest.java

    r13636 r14138  
    5252    @Rule
    5353    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
    54     public JOSMTestRules test = new JOSMTestRules().preferences().platform().projection().mapStyles().timeout(60000);
     54    public JOSMTestRules test = new JOSMTestRules().preferences().projection().mapStyles().timeout(60000);
    5555
    5656    /**
  • trunk/test/unit/org/openstreetmap/josm/JOSMFixture.java

    r14125 r14138  
    3131import org.openstreetmap.josm.tools.JosmRuntimeException;
    3232import org.openstreetmap.josm.tools.Logging;
     33import org.openstreetmap.josm.tools.PlatformManager;
    3334import org.openstreetmap.josm.tools.date.DateUtils;
    3435
     
    108109        I18n.init();
    109110        // initialize the plaform hook, and
    110         Main.determinePlatformHook();
    111111        // call the really early hook before we anything else
    112         Main.platform.preStartupHook();
     112        PlatformManager.getPlatform().preStartupHook();
    113113
    114114        Logging.setLogLevel(Logging.LEVEL_INFO);
  • trunk/test/unit/org/openstreetmap/josm/MainTest.java

    r14125 r14138  
    2121    @Rule
    2222    @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();
    2424
    2525    /**
  • trunk/test/unit/org/openstreetmap/josm/actions/AddImageryLayerActionTest.java

    r13733 r14138  
    3333    @Rule
    3434    @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();
    3636
    3737    /**
  • trunk/test/unit/org/openstreetmap/josm/actions/CopyActionTest.java

    r12636 r14138  
    4747    @Rule
    4848    @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();
    5050
    5151    /**
  • trunk/test/unit/org/openstreetmap/josm/actions/CreateCircleActionTest.java

    r12636 r14138  
    3838    @Rule
    3939    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
    40     public JOSMTestRules test = new JOSMTestRules().platform().projection().main();
     40    public JOSMTestRules test = new JOSMTestRules().projection().main();
    4141
    4242    /**
  • trunk/test/unit/org/openstreetmap/josm/actions/DeleteLayerActionTest.java

    r12636 r14138  
    2424    @Rule
    2525    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
    26     public JOSMTestRules test = new JOSMTestRules().platform();
     26    public JOSMTestRules test = new JOSMTestRules();
    2727
    2828    /**
  • trunk/test/unit/org/openstreetmap/josm/actions/ExitActionTest.java

    r14126 r14138  
    2929    @Rule
    3030    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
    31     public JOSMTestRules test = new JOSMTestRules().platform().main();
     31    public JOSMTestRules test = new JOSMTestRules().main();
    3232
    3333    /**
  • trunk/test/unit/org/openstreetmap/josm/actions/ExpertToggleActionTest.java

    r11224 r14138  
    2727    @Rule
    2828    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
    29     public JOSMTestRules test = new JOSMTestRules().preferences().platform();
     29    public JOSMTestRules test = new JOSMTestRules().preferences();
    3030
    3131    /**
  • trunk/test/unit/org/openstreetmap/josm/actions/FullscreenToggleActionTest.java

    r12562 r14138  
    1717    @Rule
    1818    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
    19     public JOSMTestRules test = new JOSMTestRules().platform().main();
     19    public JOSMTestRules test = new JOSMTestRules().main();
    2020
    2121    /**
  • trunk/test/unit/org/openstreetmap/josm/actions/JoinAreasActionTest.java

    r13950 r14138  
    4949    @Rule
    5050    @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();
    5252
    5353    /**
  • trunk/test/unit/org/openstreetmap/josm/actions/MergeLayerActionTest.java

    r12636 r14138  
    2626    @Rule
    2727    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
    28     public JOSMTestRules test = new JOSMTestRules().platform().main();
     28    public JOSMTestRules test = new JOSMTestRules().main();
    2929
    3030    private MergeLayerAction action;
  • trunk/test/unit/org/openstreetmap/josm/actions/MergeNodesActionTest.java

    r12849 r14138  
    2828    @Rule
    2929    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
    30     public JOSMTestRules test = new JOSMTestRules().platform().projection();
     30    public JOSMTestRules test = new JOSMTestRules().projection();
    3131
    3232    /**
  • trunk/test/unit/org/openstreetmap/josm/actions/PurgeActionTest.java

    r12636 r14138  
    3232    @Rule
    3333    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
    34     public JOSMTestRules test = new JOSMTestRules().platform().main();
     34    public JOSMTestRules test = new JOSMTestRules().main();
    3535
    3636    /**
  • trunk/test/unit/org/openstreetmap/josm/actions/SessionSaveAsActionTest.java

    r11109 r14138  
    2020    @Rule
    2121    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
    22     public JOSMTestRules test = new JOSMTestRules().platform();
     22    public JOSMTestRules test = new JOSMTestRules();
    2323
    2424    /**
  • trunk/test/unit/org/openstreetmap/josm/actions/UnJoinNodeWayActionTest.java

    r12636 r14138  
    4242    @Rule
    4343    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
    44     public JOSMTestRules test = new JOSMTestRules().platform();
     44    public JOSMTestRules test = new JOSMTestRules();
    4545
    4646    /**
  • trunk/test/unit/org/openstreetmap/josm/actions/mapmode/AddNoteActionTest.java

    r14101 r14138  
    2626    @Rule
    2727    @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();
    2929
    3030    /**
  • trunk/test/unit/org/openstreetmap/josm/actions/mapmode/DeleteActionTest.java

    r12636 r14138  
    2727    @Rule
    2828    @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();
    3030
    3131    /**
  • trunk/test/unit/org/openstreetmap/josm/actions/mapmode/DrawActionTest.java

    r14134 r14138  
    4040    @Rule
    4141    @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);
    4343
    4444    /**
  • trunk/test/unit/org/openstreetmap/josm/actions/mapmode/ExtrudeActionTest.java

    r12636 r14138  
    2727    @Rule
    2828    @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();
    3030
    3131    /**
  • trunk/test/unit/org/openstreetmap/josm/actions/mapmode/ImproveWayAccuracyActionTest.java

    r12636 r14138  
    2727    @Rule
    2828    @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();
    3030
    3131    /**
  • trunk/test/unit/org/openstreetmap/josm/actions/mapmode/ParallelWayActionTest.java

    r12636 r14138  
    2828    @Rule
    2929    @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();
    3131
    3232    /**
  • trunk/test/unit/org/openstreetmap/josm/actions/mapmode/PlayHeadDragModeTest.java

    r12636 r14138  
    2626    @Rule
    2727    @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();
    2929
    3030    /**
  • trunk/test/unit/org/openstreetmap/josm/actions/mapmode/SelectActionTest.java

    r12849 r14138  
    6060    @Rule
    6161    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
    62     public JOSMTestRules test = new JOSMTestRules().platform().projection().main();
     62    public JOSMTestRules test = new JOSMTestRules().projection().main();
    6363
    6464    /**
  • trunk/test/unit/org/openstreetmap/josm/actions/upload/ValidateUploadHookTest.java

    r13496 r14138  
    2121    @Rule
    2222    @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);
    2424
    2525    /**
  • trunk/test/unit/org/openstreetmap/josm/command/conflict/ConflictAddCommandTest.java

    r13616 r14138  
    3333    @Rule
    3434    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
    35     public JOSMTestRules test = new JOSMTestRules().platform();
     35    public JOSMTestRules test = new JOSMTestRules();
    3636    private CommandTestData testData;
    3737
  • trunk/test/unit/org/openstreetmap/josm/command/conflict/CoordinateConflictResolveCommandTest.java

    r13079 r14138  
    3737    @Rule
    3838    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
    39     public JOSMTestRules test = new JOSMTestRules().platform();
     39    public JOSMTestRules test = new JOSMTestRules();
    4040
    4141    /**
  • trunk/test/unit/org/openstreetmap/josm/data/PreferencesTest.java

    r12989 r14138  
    2121    @Rule
    2222    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
    23     public JOSMTestRules test = new JOSMTestRules().platform().preferences().fakeAPI();
     23    public JOSMTestRules test = new JOSMTestRules().preferences().fakeAPI();
    2424
    2525    /**
  • trunk/test/unit/org/openstreetmap/josm/data/imagery/WMSEndpointTileSourceTest.java

    r14120 r14138  
    3030    @Rule
    3131    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
    32     public JOSMTestRules test = new JOSMTestRules().platform().projection();
     32    public JOSMTestRules test = new JOSMTestRules().projection();
    3333
    3434    @Rule
  • trunk/test/unit/org/openstreetmap/josm/data/imagery/WMTSTileSourceTest.java

    r14120 r14138  
    4747    @ClassRule
    4848    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
    49     public static JOSMTestRules test = new JOSMTestRules().preferences().platform().projection().timeout((int) TimeUnit.MINUTES.toMillis(5));
     49    public static JOSMTestRules test = new JOSMTestRules().preferences().projection().timeout((int) TimeUnit.MINUTES.toMillis(5));
    5050
    5151    @Rule
  • trunk/test/unit/org/openstreetmap/josm/data/osm/DefaultNameFormatterTest.java

    r13766 r14138  
    3838    @Rule
    3939    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
    40     public JOSMTestRules test = new JOSMTestRules().platform();
     40    public JOSMTestRules test = new JOSMTestRules();
    4141
    4242    /**
  • trunk/test/unit/org/openstreetmap/josm/data/projection/ProjectionRefTest.java

    r13707 r14138  
    3535import org.junit.Rule;
    3636import org.junit.Test;
    37 import org.openstreetmap.josm.Main;
    3837import org.openstreetmap.josm.data.Bounds;
    3938import org.openstreetmap.josm.data.coor.EastNorth;
     
    4241import org.openstreetmap.josm.testutils.JOSMTestRules;
    4342import org.openstreetmap.josm.tools.Pair;
     43import org.openstreetmap.josm.tools.PlatformManager;
    4444import org.openstreetmap.josm.tools.Utils;
    4545
     
    9090    @Rule
    9191    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
    92     public JOSMTestRules test = new JOSMTestRules().platform().projectionNadGrids().timeout(90_000);
     92    public JOSMTestRules test = new JOSMTestRules().projectionNadGrids().timeout(90_000);
    9393
    9494    /**
     
    104104            }
    105105        }
    106         Main.determinePlatformHook();
    107106        Collection<RefEntry> refs = readData();
    108107        refs = updateData(refs);
     
    286285        // see http://geodesie.ign.fr/contenu/fichiers/documentation/algorithmes/notice/NT111_V1_HARMEL_TransfoNTF-RGF93_FormatGrilleNTV2.pdf
    287286        def = def.replace("ntf_r93_b.gsb", "ntf_r93.gsb");
    288         if (Main.isPlatformWindows()) {
     287        if (PlatformManager.isPlatformWindows()) {
    289288            def = def.replace("'", "\\'").replace("\"", "\\\"");
    290289        }
  • trunk/test/unit/org/openstreetmap/josm/data/projection/SwissGridTest.java

    r14120 r14138  
    2626    @Rule
    2727    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
    28     public JOSMTestRules test = new JOSMTestRules().projectionNadGrids().platform();
     28    public JOSMTestRules test = new JOSMTestRules().projectionNadGrids();
    2929
    3030    /**
  • trunk/test/unit/org/openstreetmap/josm/data/validation/OsmValidatorTest.java

    r11921 r14138  
    1919    @Rule
    2020    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
    21     public JOSMTestRules test = new JOSMTestRules().platform();
     21    public JOSMTestRules test = new JOSMTestRules();
    2222
    2323    /**
  • trunk/test/unit/org/openstreetmap/josm/data/validation/tests/MapCSSTagCheckerTest.java

    r13616 r14138  
    5252    @Rule
    5353    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
    54     public JOSMTestRules test = new JOSMTestRules().projection().platform();
     54    public JOSMTestRules test = new JOSMTestRules().projection();
    5555
    5656    static MapCSSTagChecker buildTagChecker(String css) throws ParseException {
  • trunk/test/unit/org/openstreetmap/josm/data/validation/tests/MultipolygonTestTest.java

    r12568 r14138  
    3535    @Rule
    3636    @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();
    3838
    3939    private static Way createUnclosedWay(String tags) {
  • trunk/test/unit/org/openstreetmap/josm/gui/MainApplicationTest.java

    r13812 r14138  
    2828import org.junit.Rule;
    2929import org.junit.Test;
    30 import org.openstreetmap.josm.Main;
    3130import org.openstreetmap.josm.TestUtils;
    3231import org.openstreetmap.josm.actions.AboutAction;
     
    4443import org.openstreetmap.josm.testutils.JOSMTestRules;
    4544import org.openstreetmap.josm.tools.Logging;
     45import org.openstreetmap.josm.tools.PlatformManager;
    4646import org.openstreetmap.josm.tools.Shortcut;
    4747
     
    196196    public void testSetupUIManager() {
    197197        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());
    199200    }
    200201
  • trunk/test/unit/org/openstreetmap/josm/gui/MapScalerTest.java

    r12636 r14138  
    2828    @Rule
    2929    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
    30     public JOSMTestRules test = new JOSMTestRules().main().platform().projection();
     30    public JOSMTestRules test = new JOSMTestRules().main().projection();
    3131
    3232    /**
  • trunk/test/unit/org/openstreetmap/josm/gui/NavigatableComponentTest.java

    r14120 r14138  
    5656    @Rule
    5757    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
    58     public JOSMTestRules test = new JOSMTestRules().preferences().platform().projection();
     58    public JOSMTestRules test = new JOSMTestRules().preferences().projection();
    5959
    6060    /**
  • trunk/test/unit/org/openstreetmap/josm/gui/TableCellRendererTest.java

    r14102 r14138  
    5353    @Rule
    5454    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
    55     public JOSMTestRules test = new JOSMTestRules().platform().main();
     55    public JOSMTestRules test = new JOSMTestRules().main();
    5656
    5757    /**
  • trunk/test/unit/org/openstreetmap/josm/gui/datatransfer/OsmTransferHandlerTest.java

    r14120 r14138  
    2929    @Rule
    3030    @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();
    3232
    3333    private final OsmTransferHandler transferHandler = new OsmTransferHandler();
  • trunk/test/unit/org/openstreetmap/josm/gui/dialogs/CommandStackDialogTest.java

    r14134 r14138  
    2828    @Rule
    2929    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
    30     public JOSMTestRules test = new JOSMTestRules().main().platform().projection();
     30    public JOSMTestRules test = new JOSMTestRules().main().projection();
    3131
    3232    /**
  • trunk/test/unit/org/openstreetmap/josm/gui/dialogs/ConflictDialogTest.java

    r12636 r14138  
    3333    @Rule
    3434    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
    35     public JOSMTestRules test = new JOSMTestRules().main().platform().projection();
     35    public JOSMTestRules test = new JOSMTestRules().main().projection();
    3636
    3737    /**
  • trunk/test/unit/org/openstreetmap/josm/gui/dialogs/InspectPrimitiveDialogTest.java

    r13169 r14138  
    3131    @Rule
    3232    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
    33     public JOSMTestRules test = new JOSMTestRules().main().platform().projection().mapStyles();
     33    public JOSMTestRules test = new JOSMTestRules().main().projection().mapStyles();
    3434
    3535    /**
  • trunk/test/unit/org/openstreetmap/josm/gui/dialogs/MapPaintDialogTest.java

    r12636 r14138  
    2121    @Rule
    2222    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
    23     public JOSMTestRules test = new JOSMTestRules().main().platform().projection();
     23    public JOSMTestRules test = new JOSMTestRules().main().projection();
    2424
    2525    /**
  • trunk/test/unit/org/openstreetmap/josm/gui/dialogs/MinimapDialogTest.java

    r14122 r14138  
    5858    @Rule
    5959    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
    60     public JOSMTestRules josmTestRules = new JOSMTestRules().main().platform().projection().fakeImagery();
     60    public JOSMTestRules josmTestRules = new JOSMTestRules().main().projection().fakeImagery();
    6161
    6262    /**
  • trunk/test/unit/org/openstreetmap/josm/gui/dialogs/changeset/ChangesetCacheManagerTest.java

    r13846 r14138  
    3333    @Rule
    3434    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
    35     public JOSMTestRules test = new JOSMTestRules().preferences().platform();
     35    public JOSMTestRules test = new JOSMTestRules().preferences();
    3636
    3737    /**
  • trunk/test/unit/org/openstreetmap/josm/gui/dialogs/layer/LayerVisibilityActionTest.java

    r12636 r14138  
    2626    @Rule
    2727    @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();
    2929
    3030    /**
  • trunk/test/unit/org/openstreetmap/josm/gui/dialogs/relation/GenericRelationEditorTest.java

    r14031 r14138  
    3434    @Rule
    3535    @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();
    3737
    3838    /**
  • trunk/test/unit/org/openstreetmap/josm/gui/dialogs/relation/actions/AbstractRelationEditorActionTest.java

    r14028 r14138  
    3838    @Rule
    3939    @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();
    4141
    4242    protected OsmDataLayer layer;
  • trunk/test/unit/org/openstreetmap/josm/gui/help/HelpBrowserTest.java

    r12248 r14138  
    2626    @Rule
    2727    @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();
    2929
    3030    static IHelpBrowser newHelpBrowser() {
  • trunk/test/unit/org/openstreetmap/josm/gui/layer/AbstractTileSourceLayerTest.java

    r13884 r14138  
    4646    @Rule
    4747    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
    48     public JOSMTestRules test = new JOSMTestRules().platform().projection().main();
     48    public JOSMTestRules test = new JOSMTestRules().projection().main();
    4949
    5050    private static final class TMSTileStubSource extends AbstractTMSTileSource {
  • trunk/test/unit/org/openstreetmap/josm/gui/layer/AutosaveTaskTest.java

    r13116 r14138  
    4141    @Rule
    4242    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
    43     public JOSMTestRules test = new JOSMTestRules().preferences().platform().projection();
     43    public JOSMTestRules test = new JOSMTestRules().preferences().projection();
    4444
    4545    private AutosaveTask task;
  • trunk/test/unit/org/openstreetmap/josm/gui/layer/GpxLayerTest.java

    r13211 r14138  
    4141    @Rule
    4242    @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();
    4444
    4545    private static String getHtml(GpxLayer layer) {
  • trunk/test/unit/org/openstreetmap/josm/gui/layer/OsmDataLayerTest.java

    r14075 r14138  
    4949    @Rule
    5050    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
    51     public JOSMTestRules test = new JOSMTestRules().platform().projection().main();
     51    public JOSMTestRules test = new JOSMTestRules().projection().main();
    5252
    5353    private DataSet ds;
  • trunk/test/unit/org/openstreetmap/josm/gui/layer/TMSLayerTest.java

    r12636 r14138  
    2323    @Rule
    2424    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
    25     public JOSMTestRules test = new JOSMTestRules().main().platform().projection();
     25    public JOSMTestRules test = new JOSMTestRules().main().projection();
    2626
    2727    /**
  • trunk/test/unit/org/openstreetmap/josm/gui/layer/ValidatorLayerTest.java

    r13174 r14138  
    2525    @Rule
    2626    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
    27     public JOSMTestRules test = new JOSMTestRules().platform().projection().main();
     27    public JOSMTestRules test = new JOSMTestRules().projection().main();
    2828
    2929    /**
  • trunk/test/unit/org/openstreetmap/josm/gui/layer/WMSLayerTest.java

    r12636 r14138  
    2323    @Rule
    2424    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
    25     public JOSMTestRules test = new JOSMTestRules().main().platform().projection();
     25    public JOSMTestRules test = new JOSMTestRules().main().projection();
    2626
    2727    /**
  • trunk/test/unit/org/openstreetmap/josm/gui/layer/gpx/ChooseTrackVisibilityActionTest.java

    r12564 r14138  
    1919    @Rule
    2020    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
    21     public JOSMTestRules test = new JOSMTestRules().platform();
     21    public JOSMTestRules test = new JOSMTestRules();
    2222
    2323    /**
  • trunk/test/unit/org/openstreetmap/josm/gui/layer/gpx/DownloadAlongTrackActionTest.java

    r14062 r14138  
    3232    @Rule
    3333    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
    34     public JOSMTestRules test = new JOSMTestRules().preferences().platform();
     34    public JOSMTestRules test = new JOSMTestRules().preferences();
    3535
    3636    private static PleaseWaitRunnable createTask(String file) throws Exception {
  • trunk/test/unit/org/openstreetmap/josm/gui/layer/gpx/DownloadWmsAlongTrackActionTest.java

    r14132 r14138  
    3030    @Rule
    3131    @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);
    3333
    3434    /**
  • trunk/test/unit/org/openstreetmap/josm/gui/layer/markerlayer/MarkerLayerTest.java

    r12849 r14138  
    3333    @Rule
    3434    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
    35     public JOSMTestRules test = new JOSMTestRules().main().platform().preferences().projection();
     35    public JOSMTestRules test = new JOSMTestRules().main().preferences().projection();
    3636
    3737    /**
  • trunk/test/unit/org/openstreetmap/josm/gui/preferences/imagery/AddWMSLayerPanelTest.java

    r13734 r14138  
    2020    @Rule
    2121    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
    22     public JOSMTestRules test = new JOSMTestRules().platform().preferences();
     22    public JOSMTestRules test = new JOSMTestRules().preferences();
    2323
    2424    /**
  • trunk/test/unit/org/openstreetmap/josm/gui/preferences/imagery/ImageryPreferenceTest.java

    r12849 r14138  
    2626    @Rule
    2727    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
    28     public JOSMTestRules test = new JOSMTestRules().platform().main();
     28    public JOSMTestRules test = new JOSMTestRules().main();
    2929
    3030    /**
  • trunk/test/unit/org/openstreetmap/josm/gui/preferences/plugin/PluginPreferenceHighLevelTest.java

    r14081 r14138  
    5252    public JOSMTestRules test = new JOSMTestRules().assumeRevision(
    5353        "Revision: 10000\n"
    54     ).preferences().main().assertionsInEDT().platform();
     54    ).preferences().main().assertionsInEDT();
    5555
    5656    /**
  • trunk/test/unit/org/openstreetmap/josm/gui/preferences/plugin/PluginPreferenceTest.java

    r14052 r14138  
    3434    @Rule
    3535    @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();
    3737
    3838    /**
  • trunk/test/unit/org/openstreetmap/josm/gui/preferences/server/AuthenticationPreferenceTest.java

    r10979 r14138  
    2121    @Rule
    2222    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
    23     public JOSMTestRules test = new JOSMTestRules().preferences().platform();
     23    public JOSMTestRules test = new JOSMTestRules().preferences();
    2424
    2525    /**
  • trunk/test/unit/org/openstreetmap/josm/gui/preferences/server/OverpassServerPreferenceTest.java

    r10979 r14138  
    2121    @Rule
    2222    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
    23     public JOSMTestRules test = new JOSMTestRules().preferences().platform();
     23    public JOSMTestRules test = new JOSMTestRules().preferences();
    2424
    2525    /**
  • trunk/test/unit/org/openstreetmap/josm/gui/preferences/server/ProxyPreferenceTest.java

    r10979 r14138  
    2121    @Rule
    2222    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
    23     public JOSMTestRules test = new JOSMTestRules().preferences().platform();
     23    public JOSMTestRules test = new JOSMTestRules().preferences();
    2424
    2525    /**
  • trunk/test/unit/org/openstreetmap/josm/gui/preferences/server/ServerAccessPreferenceTest.java

    r10979 r14138  
    2121    @Rule
    2222    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
    23     public JOSMTestRules test = new JOSMTestRules().preferences().platform();
     23    public JOSMTestRules test = new JOSMTestRules().preferences();
    2424
    2525    /**
  • trunk/test/unit/org/openstreetmap/josm/gui/tagging/presets/TaggingPresetReaderTest.java

    r11921 r14138  
    3333    @Rule
    3434    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
    35     public JOSMTestRules test = new JOSMTestRules().platform();
     35    public JOSMTestRules test = new JOSMTestRules();
    3636
    3737    /**
  • trunk/test/unit/org/openstreetmap/josm/io/CertificateAmendmentTestIT.java

    r14099 r14138  
    2525    @Rule
    2626    @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);
    2828
    2929    /**
  • trunk/test/unit/org/openstreetmap/josm/io/NetworkManagerTest.java

    r14121 r14138  
    2626    @Rule
    2727    @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();
    2929
    3030    /**
  • trunk/test/unit/org/openstreetmap/josm/io/imagery/WMSImageryTest.java

    r13878 r14138  
    3232    @Rule
    3333    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
    34     public JOSMTestRules test = new JOSMTestRules().platform().projection();
     34    public JOSMTestRules test = new JOSMTestRules().projection();
    3535
    3636    @Rule
  • trunk/test/unit/org/openstreetmap/josm/io/remotecontrol/handler/ImageryHandlerTest.java

    r12558 r14138  
    2626    @Rule
    2727    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
    28     public JOSMTestRules test = new JOSMTestRules().platform();
     28    public JOSMTestRules test = new JOSMTestRules();
    2929
    3030    private static ImageryHandler newHandler(String url) throws RequestHandlerBadRequestException {
  • trunk/test/unit/org/openstreetmap/josm/io/session/SessionReaderTest.java

    r13243 r14138  
    3737    @Rule
    3838    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
    39     public JOSMTestRules test = new JOSMTestRules().platform().projection();
     39    public JOSMTestRules test = new JOSMTestRules().projection();
    4040
    4141    private static String getSessionDataDir() {
  • trunk/test/unit/org/openstreetmap/josm/io/session/SessionWriterTest.java

    r14120 r14138  
    8989    @Rule
    9090    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
    91     public JOSMTestRules test = new JOSMTestRules().platform().projection().main();
     91    public JOSMTestRules test = new JOSMTestRules().projection().main();
    9292
    9393    /**
  • trunk/test/unit/org/openstreetmap/josm/plugins/PluginHandlerTest.java

    r13079 r14138  
    3434    @Rule
    3535    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
    36     public JOSMTestRules test = new JOSMTestRules().platform();
     36    public JOSMTestRules test = new JOSMTestRules();
    3737
    3838    /**
  • trunk/test/unit/org/openstreetmap/josm/plugins/PluginHandlerTestIT.java

    r14113 r14138  
    4242    @Rule
    4343    @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);
    4545
    4646    /**
  • trunk/test/unit/org/openstreetmap/josm/spi/lifecycle/LifecycleTest.java

    r14125 r14138  
    2121    @Rule
    2222    @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();
    2424
    2525    private static class InitStatusListenerStub implements InitStatusListener {
  • trunk/test/unit/org/openstreetmap/josm/testutils/JOSMTestRules.java

    r14120 r14138  
    7979    private Runnable navigableComponentMockingRunnable;
    8080    private Runnable edtAssertionMockingRunnable;
    81     private boolean platform;
    8281    private boolean useProjection;
    8382    private boolean useProjectionNadGrids;
     
    150149     * Enable {@link Main#platform} global variable.
    151150     * @return this instance, for easy chaining
    152      */
     151     * @deprecated Not needed anymore
     152     */
     153    @Deprecated
    153154    public JOSMTestRules platform() {
    154         platform = true;
    155155        return this;
    156156    }
     
    209209    public JOSMTestRules https() {
    210210        useHttps = true;
    211         platform = true;
    212211        return this;
    213212    }
     
    457456            // We force the use of a wrong API server, just in case anyone attempts an upload
    458457            Config.getPref().put("osm-server.url", "http://invalid");
    459         }
    460 
    461         // Set Platform
    462         if (platform) {
    463             Main.determinePlatformHook();
    464458        }
    465459
     
    550544        cleanLayerEnvironment();
    551545        Main.pref.resetToInitialState();
    552         Main.platform = null;
    553546        System.gc();
    554547    }
     
    592585        ProjectionRegistry.clearProjectionChangeListeners();
    593586        Main.pref.resetToInitialState();
    594         Main.platform = null;
    595587
    596588        if (this.assumeRevisionString != null && this.originalVersion != null) {
  • trunk/test/unit/org/openstreetmap/josm/tools/KeyboardUtilsTest.java

    r14026 r14138  
    2626    @Rule
    2727    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
    28     public JOSMTestRules rules = new JOSMTestRules().platform();
     28    public JOSMTestRules rules = new JOSMTestRules();
    2929
    3030    /**
  • trunk/test/unit/org/openstreetmap/josm/tools/PlatformHookOsxTest.java

    r14119 r14138  
    1414import org.junit.Test;
    1515import org.openstreetmap.josm.JOSMFixture;
    16 import org.openstreetmap.josm.Main;
    1716import org.openstreetmap.josm.spi.preferences.Config;
    1817
     
    6463    @Test
    6564    public void testOpenUrl() throws IOException {
    66         if (!Main.isPlatformWindows()) {
     65        if (!PlatformManager.isPlatformWindows()) {
    6766            hook.openUrl(Config.getUrls().getJOSMWebsite());
    6867        } else {
     
    8382        File cache = hook.getDefaultCacheDirectory();
    8483        assertNotNull(cache);
    85         if (Main.isPlatformOsx()) {
     84        if (PlatformManager.isPlatformOsx()) {
    8685            assertTrue(cache.toString().contains("/Library/"));
    8786        }
     
    9594        File cache = hook.getDefaultPrefDirectory();
    9695        assertNotNull(cache);
    97         if (Main.isPlatformOsx()) {
     96        if (PlatformManager.isPlatformOsx()) {
    9897            assertTrue(cache.toString().contains("/Library/"));
    9998        }
     
    114113    public void testGetOSDescription() {
    115114        String os = hook.getOSDescription();
    116         if (Main.isPlatformOsx()) {
     115        if (PlatformManager.isPlatformOsx()) {
    117116            assertTrue(os.contains("Mac"));
    118117        } else {
  • trunk/test/unit/org/openstreetmap/josm/tools/PlatformHookWindowsTest.java

    r14119 r14138  
    1919import org.junit.Test;
    2020import org.openstreetmap.josm.JOSMFixture;
    21 import org.openstreetmap.josm.Main;
    2221import org.openstreetmap.josm.io.remotecontrol.RemoteControlHttpsServer;
    2322import org.openstreetmap.josm.io.remotecontrol.RemoteControlTest;
     
    5453    @Test
    5554    public void testGetRootKeystore() throws Exception {
    56         if (Main.isPlatformWindows()) {
     55        if (PlatformManager.isPlatformWindows()) {
    5756            assertNotNull(PlatformHookWindows.getRootKeystore());
    5857        } else {
     
    7271    @Test
    7372    public void testRemoveInsecureCertificates() throws Exception {
    74         if (Main.isPlatformWindows()) {
     73        if (PlatformManager.isPlatformWindows()) {
    7574            PlatformHookWindows.removeInsecureCertificates();
    7675        } else {
     
    9392        KeyStore ks = RemoteControlHttpsServer.loadJosmKeystore();
    9493        TrustedCertificateEntry trustedCert = new KeyStore.TrustedCertificateEntry(ks.getCertificate(ks.aliases().nextElement()));
    95         if (Main.isPlatformWindows()) {
     94        if (PlatformManager.isPlatformWindows()) {
    9695            hook.setupHttpsCertificate(RemoteControlHttpsServer.ENTRY_ALIAS, trustedCert);
    9796        } else {
     
    119118    @Test
    120119    public void testOpenUrl() throws IOException {
    121         if (Main.isPlatformWindows()) {
     120        if (PlatformManager.isPlatformWindows()) {
    122121            hook.openUrl(Config.getUrls().getJOSMWebsite());
    123122        } else {
     
    146145        File cache = hook.getDefaultCacheDirectory();
    147146        assertNotNull(cache);
    148         if (Main.isPlatformWindows()) {
     147        if (PlatformManager.isPlatformWindows()) {
    149148            assertTrue(cache.toString().contains(":"));
    150149        }
     
    158157        File cache = hook.getDefaultPrefDirectory();
    159158        assertNotNull(cache);
    160         if (Main.isPlatformWindows()) {
     159        if (PlatformManager.isPlatformWindows()) {
    161160            assertTrue(cache.toString().contains(":"));
    162161        }
     
    177176    public void testGetInstalledFonts() {
    178177        Collection<String> fonts = hook.getInstalledFonts();
    179         if (Main.isPlatformWindows()) {
     178        if (PlatformManager.isPlatformWindows()) {
    180179            assertFalse(fonts.isEmpty());
    181180        } else {
     
    190189    public void testGetOSDescription() {
    191190        String os = hook.getOSDescription();
    192         if (Main.isPlatformWindows()) {
     191        if (PlatformManager.isPlatformWindows()) {
    193192            assertTrue(os.contains("Windows"));
    194193        } else {
  • trunk/test/unit/org/openstreetmap/josm/tools/RightAndLefthandTrafficTest.java

    r12556 r14138  
    2121    @Rule
    2222    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
    23     public JOSMTestRules rules = new JOSMTestRules().platform().projection().rlTraffic();
     23    public JOSMTestRules rules = new JOSMTestRules().projection().rlTraffic();
    2424
    2525    /**
  • trunk/test/unit/org/openstreetmap/josm/tools/TerritoriesTest.java

    r12802 r14138  
    2121    @Rule
    2222    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
    23     public JOSMTestRules rules = new JOSMTestRules().platform().projection().territories();
     23    public JOSMTestRules rules = new JOSMTestRules().projection().territories();
    2424
    2525    /**
  • trunk/test/unit/org/openstreetmap/josm/tools/bugreport/BugReportTest.java

    r12779 r14138  
    2727    @Rule
    2828    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
    29     public JOSMTestRules test = new JOSMTestRules().preferences().platform();
     29    public JOSMTestRules test = new JOSMTestRules().preferences();
    3030
    3131    /**
Note: See TracChangeset for help on using the changeset viewer.