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:
909 bytes
|
Line | |
---|
1 | // License: GPL. For details, see LICENSE file.
|
---|
2 | package org.openstreetmap.josm.plugins;
|
---|
3 |
|
---|
4 | import static org.junit.jupiter.api.Assertions.assertEquals;
|
---|
5 |
|
---|
6 | import org.junit.jupiter.api.Test;
|
---|
7 |
|
---|
8 | /**
|
---|
9 | * Unit tests of {@link PluginException} class.
|
---|
10 | */
|
---|
11 | class PluginExceptionTest {
|
---|
12 | /**
|
---|
13 | * Unit test of {@link PluginException#PluginException}.
|
---|
14 | */
|
---|
15 | @Test
|
---|
16 | void testPluginDownloadException() {
|
---|
17 | PluginException ex = new PluginException("foo");
|
---|
18 | assertEquals("foo", ex.getMessage());
|
---|
19 | NullPointerException npe = new NullPointerException();
|
---|
20 | ex = new PluginException("bar", npe);
|
---|
21 | assertEquals("An error occurred in plugin bar", ex.getMessage());
|
---|
22 | assertEquals(npe, ex.getCause());
|
---|
23 | ex = new PluginException(null, "foobar", npe);
|
---|
24 | assertEquals("An error occurred in plugin foobar", ex.getMessage());
|
---|
25 | assertEquals(npe, ex.getCause());
|
---|
26 | }
|
---|
27 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.