Changeset 19565 in josm for trunk/test/unit/org
- Timestamp:
- 2026-04-11T20:56:38+02:00 (4 days ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/test/unit/org/openstreetmap/josm/plugins/PluginHandlerTest.java
r18037 r19565 14 14 import java.util.stream.Stream; 15 15 16 import javax.swing.JLabel; 16 17 import javax.swing.JOptionPane; 18 import javax.swing.JPanel; 17 19 import javax.swing.JScrollPane; 18 20 … … 174 176 assertEquals("Plugin information", invocationLogEntry[2]); 175 177 } 178 179 /** 180 * Unit test of {@link PluginHandler#getInfoPanel}. 181 */ 182 @Test 183 void testGetInfoPanel() { 184 JPanel panel = PluginHandler.getInfoPanel(); 185 assertNotNull(panel); 186 187 assertTrue(PluginHandler.getPlugins().isEmpty()); 188 189 // if no plugins are loaded in the test environment, the panel should show "No plugins installed" 190 boolean found = Arrays.stream(panel.getComponents()) 191 .filter(JLabel.class::isInstance) 192 .map(JLabel.class::cast) 193 .anyMatch(l -> l.getText().equals("No plugins installed")); 194 assertTrue(found, "Should find 'No plugins installed' label"); 195 } 176 196 }
Note:
See TracChangeset
for help on using the changeset viewer.
