1   package org.org.usurper;
2   
3   import java.lang.reflect.InvocationTargetException;
4   
5   import junit.framework.TestCase;
6   
7   import org.org.usurper.handlers.exceptions.NoHandlerDefinedException;
8   import org.org.usurper.handlers.exceptions.PropertyTypeHandlingException;
9   import org.org.usurper.handlers.exceptions.SpecificPropertyHandlingException;
10  
11  /**
12   * Test used to improve coverage... shameful... :P
13   * 
14   * @author pagregoire
15   */
16  public class UnderTheCarpetTest extends TestCase {
17      public void testBlah() throws IllegalArgumentException, SecurityException, InstantiationException, IllegalAccessException, InvocationTargetException, NoSuchMethodException {
18          testException(UsurperException.class);
19          testException(NoHandlerDefinedException.class);
20          testException(SpecificPropertyHandlingException.class);
21          testException(PropertyTypeHandlingException.class);
22      }
23  
24      private void testException(Class<?> name) throws IllegalArgumentException, SecurityException, InstantiationException, IllegalAccessException, InvocationTargetException, NoSuchMethodException {
25          name.getConstructor(new Class[] {}).newInstance(new Object[] {});
26          name.getConstructor(new Class[] { String.class }).newInstance(new Object[] { "" });
27          name.getConstructor(new Class[] { String.class, Throwable.class }).newInstance(new Object[] { "", new Exception() });
28          name.getConstructor(new Class[] { Throwable.class }).newInstance(new Object[] { new Exception() });
29      }
30  }