Changeset 10899 in josm for trunk/test
- Timestamp:
- 2016-08-25T23:21:10+02:00 (8 years ago)
- Location:
- trunk/test/unit/org/openstreetmap/josm
- Files:
-
- 1 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/test/unit/org/openstreetmap/josm/JOSMFixture.java
r10876 r10899 22 22 import org.openstreetmap.josm.io.OsmApi; 23 23 import org.openstreetmap.josm.tools.I18n; 24 import org.openstreetmap.josm.tools.Logging; 24 25 25 26 /** … … 99 100 Main.platform.preStartupHook(); 100 101 101 Main.logLevel= 3;102 Logging.setLogLevel(Logging.LEVEL_INFO); 102 103 Main.pref.init(false); 103 104 String url = Main.pref.get("osm-server.url"); -
trunk/test/unit/org/openstreetmap/josm/MainTest.java
r10340 r10899 3 3 4 4 import static org.junit.Assert.assertEquals; 5 import static org.junit.Assert.assertFalse;6 5 import static org.junit.Assert.assertNull; 7 6 import static org.junit.Assert.assertTrue; … … 12 11 import org.junit.Test; 13 12 import org.openstreetmap.josm.Main.DownloadParamType; 14 import org.openstreetmap.josm.gui.MainApplication;15 13 16 14 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; … … 43 41 44 42 /** 45 * Unit test of {@code Main#preConstructorInit}.46 */47 @Test48 public void testPreConstructorInit() {49 Main.preConstructorInit(MainApplication.buildCommandLineArgumentMap(new String[0]));50 Main.preConstructorInit(MainApplication.buildCommandLineArgumentMap(new String[]{"--geometry=400x300+10+5", "--no-maximize"}));51 //assertEquals(new WindowGeometry(new Point(10, 5), new Dimension(400, 300)), Main.geometry); // FIXME see #1292752 }53 54 /**55 43 * Unit tests on log messages. 56 44 */ … … 78 66 assertTrue(warnings.contains("W: Warning message on one line")); 79 67 assertTrue(warnings.contains("W: First line of warning message on several lines")); 80 81 int defaultLevel = Main.logLevel;82 83 // Check levels84 Main.logLevel = 5;85 assertTrue(Main.isTraceEnabled());86 assertTrue(Main.isDebugEnabled());87 88 Main.logLevel = 4;89 assertFalse(Main.isTraceEnabled());90 assertTrue(Main.isDebugEnabled());91 92 Main.logLevel = 3;93 assertFalse(Main.isTraceEnabled());94 assertFalse(Main.isDebugEnabled());95 96 Main.logLevel = defaultLevel;97 68 } 98 69 } -
trunk/test/unit/org/openstreetmap/josm/testutils/JOSMTestRules.java
r10876 r10899 20 20 import org.openstreetmap.josm.io.OsmTransferCanceledException; 21 21 import org.openstreetmap.josm.tools.I18n; 22 import org.openstreetmap.josm.tools.Logging; 22 23 import org.openstreetmap.josm.tools.MemoryManagerTest; 23 24 import org.openstreetmap.josm.tools.date.DateUtils; … … 182 183 TimeZone.setDefault(DateUtils.UTC); 183 184 // Set log level to info 184 Main.logLevel= 3;185 Logging.setLogLevel(Logging.LEVEL_INFO); 185 186 186 187 // Set up i18n
Note:
See TracChangeset
for help on using the changeset viewer.