package edu.hawaii.ics.yucheng; import junit.framework.TestCase; /** * Tests the GraphException class. */ public class GraphExceptionTest extends TestCase { /** * Tests the constructor. * * @throws Exception */ public void testConstructor1() throws Exception { final GraphException e = new GraphException("Test Message"); assertEquals("Test Message", e.getMessage()); } /** * Tests the constructor. * * @throws Exception */ public void testConstructor2() throws Exception { final Exception e1 = new Exception("Test Message 2"); final GraphException e = new GraphException("Test Message", e1); assertEquals("Test Message", e.getMessage()); assertEquals("Test Message 2", e.getCause().getMessage()); } }