1   package com.sourceforge.jpatterns.core.configuration.exceptions;
2   
3   import com.sourceforge.jpatterns.core.JPException;
4   import junit.framework.Test;
5   import junit.framework.TestCase;
6   import junit.framework.TestSuite;
7   import org.apache.log4j.Logger;
8   
9   /**
10   * $Author::                    $<br/>
11   * $Rev::                       $<br/>
12   * $Date::                      $<br/>
13   */
14  public class JPConsumerConfigExceptionTest extends TestCase
15  {
16      /**
17       * Logger instance.
18       */
19      final public static Logger LOG = Logger.getLogger(JPConsumerConfigExceptionTest.class);
20  
21      /**
22       * Instance of the covered class to be used below in the tests
23       */
24      private JPConsumerConfigException m_jpConsumerConfigException;
25  
26      /**
27       * Contructor with name of test attribute.
28       *
29       * @param name name of the test
30       */
31      public JPConsumerConfigExceptionTest(String name)
32      {
33          super(name);
34      }
35  
36      /**
37       * Perform the set up functionality for the test.
38       *
39       * @throws Exception may occur in the case of some problems
40       */
41      public void setUp() throws Exception
42      {
43          super.setUp();
44      }
45  
46      /**
47       * Perform the tear down functionality for the test
48       *
49       * @throws Exception may occur in the case of some problems
50       */
51      public void tearDown() throws Exception
52      {
53          super.tearDown();
54      }
55  
56      /**
57       * Test suite method
58       *
59       * @return the built test suite
60       */
61      public static Test suite()
62      {
63          return new TestSuite(JPConsumerConfigExceptionTest.class);
64      }
65  
66      /**
67       * Tests {@link JPConsumerConfigException#JPConsumerConfigException}
68       *
69       * @throws Exception in the case smth. wrong occuried.
70       * @forversion 1.0
71       */
72      public void testJPConsumerConfigurationException() throws Exception
73      {
74          JPException jpException = new JPConsumerConfigException();
75          jpException = new JPConsumerConfigException("Checking the exception");
76          jpException = new JPConsumerConfigException(new Exception("Checking the exception"));
77          jpException = new JPConsumerConfigException("Checking the exception", new Exception("Checking the exception"));
78      }
79  }