Line | |
---|
1 | package org.openstreetmap.josm.plugins;
|
---|
2 |
|
---|
3 | import junit.framework.TestCase;
|
---|
4 |
|
---|
5 | public class PluginExceptionTest extends TestCase {
|
---|
6 |
|
---|
7 | public void testConstructorPassesExceptionParameterAndSetPluginName() {
|
---|
8 | RuntimeException barEx = new RuntimeException("bar");
|
---|
9 | PluginException e = new PluginException(new PluginProxy(new String(), null), "42", barEx);
|
---|
10 | assertEquals(barEx, e.getCause());
|
---|
11 | assertEquals("42", e.name);
|
---|
12 | }
|
---|
13 |
|
---|
14 | public void testMessageContainsThePluginName() {
|
---|
15 | PluginException e = new PluginException(new PluginProxy(new String(), null), "42", new RuntimeException());
|
---|
16 | assertTrue(e.getMessage().contains("42"));
|
---|
17 | }
|
---|
18 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.