use of com.tvd12.ezyfoxserver.support.reflect.EzyExceptionHandlerMethod in project ezyfox-server by youngmonkeys.
the class EzyExceptionHandlerImplementerTest method testFailedCase.
@Test(expectedExceptions = IllegalStateException.class)
public void testFailedCase() throws Exception {
EzyExceptionHandlerProxy handlerProxy = new EzyExceptionHandlerProxy(new ExceptionHandlerFail());
EzyExceptionHandlerMethod method = new EzyExceptionHandlerMethod(new EzyMethod(ExceptionHandlerFail.class.getDeclaredMethod("handle", Exception.class, int.class)));
new EzyExceptionHandlerImplementer(handlerProxy, method) {
@SuppressWarnings("rawtypes")
@Override
protected EzyUncaughtExceptionHandler doImplement() {
throw new IllegalStateException("test");
}
}.implement();
}
Aggregations