Ignore:
Timestamp:
2017-08-24T15:54:00+02:00 (7 years ago)
Author:
Don-vip
Message:

see #15182 - deprecate Main.worker, replace it by gui.MainApplication.worker + code refactoring to make sure only editor packages use it

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/test/unit/org/openstreetmap/josm/gui/MainApplicationTest.java

    r12633 r12634  
    4747    @Rule
    4848    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
    49     public JOSMTestRules test = new JOSMTestRules().platform().main();
     49    public JOSMTestRules test = new JOSMTestRules().main().https().devAPI().timeout(20000);
    5050
    5151    @SuppressFBWarnings(value = "DM_DEFAULT_ENCODING")
     
    8585    public void testShowHelp() throws Exception {
    8686        testShow("--help", MainApplication.getHelp().trim());
     87    }
     88
     89    /**
     90     * Unit test of {@link DownloadParamType#paramType} method.
     91     */
     92    @Test
     93    public void testParamType() {
     94        assertEquals(DownloadParamType.bounds, DownloadParamType.paramType("48.000,16.000,48.001,16.001"));
     95        assertEquals(DownloadParamType.fileName, DownloadParamType.paramType("data.osm"));
     96        assertEquals(DownloadParamType.fileUrl, DownloadParamType.paramType("file:///home/foo/data.osm"));
     97        assertEquals(DownloadParamType.fileUrl, DownloadParamType.paramType("file://C:\\Users\\foo\\data.osm"));
     98        assertEquals(DownloadParamType.httpUrl, DownloadParamType.paramType("http://somewhere.com/data.osm"));
     99        assertEquals(DownloadParamType.httpUrl, DownloadParamType.paramType("https://somewhere.com/data.osm"));
    87100    }
    88101
Note: See TracChangeset for help on using the changeset viewer.