Ticket #21740: 21740-junit.patch
| File 21740-junit.patch, 3.6 KB (added by , 4 years ago) |
|---|
-
test/unit/org/openstreetmap/josm/gui/layer/MainLayerManagerTest.java
2 2 package org.openstreetmap.josm.gui.layer; 3 3 4 4 import static org.junit.jupiter.api.Assertions.assertEquals; 5 import static org.junit.jupiter.api.Assertions.assertFalse; 5 6 import static org.junit.jupiter.api.Assertions.assertNull; 6 7 import static org.junit.jupiter.api.Assertions.assertSame; 7 import static org.junit.jupiter.api.Assertions.assertThrows;8 8 9 9 import java.util.Arrays; 10 10 … … 16 16 import org.openstreetmap.josm.gui.layer.MainLayerManager.ActiveLayerChangeEvent; 17 17 import org.openstreetmap.josm.gui.layer.MainLayerManager.ActiveLayerChangeListener; 18 18 import org.openstreetmap.josm.gui.util.GuiHelper; 19 import org.openstreetmap.josm.tools.Logging; 19 20 20 21 /** 21 22 * Tests {@link MainLayerManager}. … … 145 146 void testAddActiveLayerChangeListenerTwice() { 146 147 CapturingActiveLayerChangeListener listener = new CapturingActiveLayerChangeListener(); 147 148 layerManagerWithActive.addActiveLayerChangeListener(listener); 148 assertThrows(IllegalArgumentException.class, () -> layerManagerWithActive.addActiveLayerChangeListener(listener)); 149 Logging.clearLastErrorAndWarnings(); 150 layerManagerWithActive.addActiveLayerChangeListener(listener); 151 assertFalse(Logging.getLastErrorAndWarnings().isEmpty()); 149 152 } 150 153 151 154 /** … … 171 174 */ 172 175 @Test 173 176 void testRemoveActiveLayerChangeListenerNotInList() { 174 assertThrows(IllegalArgumentException.class, 175 () -> layerManagerWithActive.removeActiveLayerChangeListener(new CapturingActiveLayerChangeListener())); 177 Logging.clearLastErrorAndWarnings(); 178 layerManagerWithActive.removeActiveLayerChangeListener(new CapturingActiveLayerChangeListener()); 179 assertFalse(Logging.getLastErrorAndWarnings().isEmpty()); 176 180 } 177 181 178 182 /** -
tools/eclipse/JOSM
9 9 <booleanAttribute key="org.eclipse.jdt.launching.ATTR_ATTR_USE_ARGFILE" value="false"/> 10 10 <booleanAttribute key="org.eclipse.jdt.launching.ATTR_SHOW_CODEDETAILS_IN_EXCEPTION_MESSAGES" value="true"/> 11 11 <booleanAttribute key="org.eclipse.jdt.launching.ATTR_USE_CLASSPATH_ONLY_JAR" value="false"/> 12 <stringAttribute key="org.eclipse.jdt.launching.JRE_CONTAINER" value="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8 "/>12 <stringAttribute key="org.eclipse.jdt.launching.JRE_CONTAINER" value="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8/"/> 13 13 <stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.openstreetmap.josm.gui.MainApplication"/> 14 14 <stringAttribute key="org.eclipse.jdt.launching.MODULE_NAME" value="JOSM"/> 15 <stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-- trace"/>15 <stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="--debug"/> 16 16 <stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="JOSM"/> 17 17 <stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-ea -Xverify:none"/> 18 18 </launchConfiguration>
