source: josm/test/org/openstreetmap/josm/plugins/PluginExceptionTest.java@ 158

Last change on this file since 158 was 153, checked in by imi, 18 years ago
  • added possibility to create new download tasks (download data types).
  • removed WMS stuff (now available as landsat - plugin)
  • updated translation files
File size: 654 bytes
Line 
1package org.openstreetmap.josm.plugins;
2
3import junit.framework.TestCase;
4
5public 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.getName());
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.