1 25 package org.objectweb.easybeans.tests.common.helper; 26 27 28 29 34 public final class ExceptionHelper { 35 36 40 private ExceptionHelper(){ 41 } 42 43 48 public static void checkCause(final Exception e, final Class expected){ 49 if (!(expected.equals(e.getCause().getClass()))){ 50 throw new IllegalStateException (e.getCause()); 51 } 52 } 53 54 60 public static boolean isEquals(final Exception e, final Class expectedException) { 61 return e.getClass().getName() == expectedException.getName(); 62 } 63 64 } 65 | Popular Tags |