source: josm/trunk/test/unit/org/openstreetmap/josm/plugins/PluginDownloadExceptionTest.java

Last change on this file was 18037, checked in by Don-vip, 3 years ago

fix #21064 - Add JUnit 5 extension for preferences (patch by taylor.smock)

  • Property svn:eol-style set to native
File size: 852 bytes
Line 
1// License: GPL. For details, see LICENSE file.
2package org.openstreetmap.josm.plugins;
3
4import static org.junit.jupiter.api.Assertions.assertEquals;
5
6import org.junit.jupiter.api.Test;
7
8/**
9 * Unit tests of {@link PluginDownloadException} class.
10 */
11class PluginDownloadExceptionTest {
12 /**
13 * Unit test of {@link PluginDownloadException#PluginDownloadException}.
14 */
15 @Test
16 void testPluginDownloadException() {
17 PluginDownloadException ex = new PluginDownloadException("foo");
18 assertEquals("foo", ex.getMessage());
19 NullPointerException npe = new NullPointerException();
20 ex = new PluginDownloadException(npe);
21 assertEquals(npe, ex.getCause());
22 ex = new PluginDownloadException("bar", npe);
23 assertEquals("bar", ex.getMessage());
24 assertEquals(npe, ex.getCause());
25 }
26}
Note: See TracBrowser for help on using the repository browser.