blob: ad7d714004ffc8020ac109de6b3ccfd098ee86e2 [file] [log] [blame]
package org.jsecurity;
import junit.framework.TestCase;
import org.jsecurity.util.ClassUtils;
import org.junit.Test;
/**
* Created by IntelliJ IDEA.
* User: lhazlewood
* Date: Mar 29, 2008
* Time: 1:19:55 PM
* To change this template use File | Settings | File Templates.
*/
public abstract class ExceptionTest extends TestCase {
protected abstract Class getExceptionClass();
@Test
public void testNoArgConstructor() {
ClassUtils.newInstance(getExceptionClass());
}
@Test
public void testMsgConstructor() throws Exception {
ClassUtils.newInstance(getExceptionClass(), "Msg");
}
@Test
public void testCauseConstructor() throws Exception {
ClassUtils.newInstance(getExceptionClass(), new Throwable() );
}
@Test
public void testMsgCauseConstructor() {
ClassUtils.newInstance(getExceptionClass(), "Msg", new Throwable() );
}
}