KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > objectweb > celtix > tools > common > toolspec > ToolExceptionTest


1 package org.objectweb.celtix.tools.common.toolspec;
2
3 import junit.framework.TestCase;
4 import org.objectweb.celtix.tools.common.ToolException;
5 public class ToolExceptionTest extends TestCase {
6     public void testMassMethod() {
7         ToolException e = new ToolException("e");
8         assertTrue(e.getCause() == null);
9         e = new ToolException("run time exception", new RuntimeException JavaDoc("test run time exception"));
10         assertTrue(e.getCause() instanceof RuntimeException JavaDoc);
11         assertTrue(e.toString() != null);
12     }
13 }
14
Popular Tags