protected void runTestMethod() { try { testMethod.invoke(test); if (testMethod.expectsException()) { addFailure(new AssertionError("Expected exception: " + testMethod.getExpectedException().getName())); } } catch (InvocationTargetException e) { Throwable actual = e.getTargetException(); if (actual instanceof AssumptionViolatedException) { return; } else if (!testMethod.expectsException()) { addFailure(actual); } else if (testMethod.isUnexpected(actual)) { String message = "Unexpected exception, expected<" + testMethod.getExpectedException().getName() + "> but was<" + actual.getClass().getName() + ">"; addFailure(new Exception(message, actual)); } } catch (Throwable e) { addFailure(e); } }
protected void runTestMethod() { try { fTestMethod.invoke(fTest); if (fTestMethod.expectsException()) { addFailure(new AssertionError("Expected exception: " + fTestMethod.getExpectedException().getName())); } } catch (InvocationTargetException e) { Throwable actual = e.getTargetException(); if (actual instanceof AssumptionViolatedException) { return; } else if (!fTestMethod.expectsException()) { addFailure(actual); } else if (fTestMethod.isUnexpected(actual)) { String message = "Unexpected exception, expected<" + fTestMethod.getExpectedException().getName() + "> but was<" + actual.getClass().getName() + ">"; addFailure(new Exception(message, actual)); } } catch (Throwable e) { addFailure(e); } }
protected void runTestMethod() { try { fTestMethod.invoke(fTest); if (fTestMethod.expectsException()) { addFailure(new AssertionError("Expected exception: " + fTestMethod.getExpectedException().getName())); } } catch (InvocationTargetException e) { Throwable actual = e.getTargetException(); if (actual instanceof AssumptionViolatedException) { return; } else if (!fTestMethod.expectsException()) { addFailure(actual); } else if (fTestMethod.isUnexpected(actual)) { String message = "Unexpected exception, expected<" + fTestMethod.getExpectedException().getName() + "> but was<" + actual.getClass().getName() + ">"; addFailure(new Exception(message, actual)); } } catch (Throwable e) { addFailure(e); } }
@Override public void invoke(final Object testFixture) throws IllegalAccessException, InvocationTargetException { super.invoke(testFixture); if (mockeryField != null) { mockeryOf(testFixture).assertIsSatisfied(); } } };
protected void runTestMethod() { try { testMethod.invoke(test); if (testMethod.expectsException()) { addFailure(new AssertionError("Expected exception: " + testMethod.getExpectedException().getName())); } } catch (InvocationTargetException e) { Throwable actual = e.getTargetException(); if (actual instanceof AssumptionViolatedException) { return; } else if (!testMethod.expectsException()) { addFailure(actual); } else if (testMethod.isUnexpected(actual)) { String message = "Unexpected exception, expected<" + testMethod.getExpectedException().getName() + "> but was<" + actual.getClass().getName() + ">"; addFailure(new Exception(message, actual)); } } catch (Throwable e) { addFailure(e); } }
protected void runTestMethod() { try { testMethod.invoke(test); if (testMethod.expectsException()) { addFailure(new AssertionError("Expected exception: " + testMethod.getExpectedException().getName())); } } catch (InvocationTargetException e) { Throwable actual = e.getTargetException(); if (actual instanceof AssumptionViolatedException) { return; } else if (!testMethod.expectsException()) { addFailure(actual); } else if (testMethod.isUnexpected(actual)) { String message = "Unexpected exception, expected<" + testMethod.getExpectedException().getName() + "> but was<" + actual.getClass().getName() + ">"; addFailure(new Exception(message, actual)); } } catch (Throwable e) { addFailure(e); } }
protected void runTestMethod() { try { fTestMethod.invoke(fTest); if (fTestMethod.expectsException()) { addFailure(new AssertionError("Expected exception: " + fTestMethod.getExpectedException().getName())); } } catch (InvocationTargetException e) { Throwable actual = e.getTargetException(); if (actual instanceof AssumptionViolatedException) { return; } else if (!fTestMethod.expectsException()) { addFailure(actual); } else if (fTestMethod.isUnexpected(actual)) { String message = "Unexpected exception, expected<" + fTestMethod.getExpectedException().getName() + "> but was<" + actual.getClass().getName() + ">"; addFailure(new Exception(message, actual)); } } catch (Throwable e) { addFailure(e); } }
protected void runTestMethod() { try { fTestMethod.invoke(fTest); if (fTestMethod.expectsException()) { addFailure(new AssertionError("Expected exception: " + fTestMethod.getExpectedException().getName())); } } catch (InvocationTargetException e) { Throwable actual = e.getTargetException(); if (actual instanceof AssumptionViolatedException) { return; } else if (!fTestMethod.expectsException()) { addFailure(actual); } else if (fTestMethod.isUnexpected(actual)) { String message = "Unexpected exception, expected<" + fTestMethod.getExpectedException().getName() + "> but was<" + actual.getClass().getName() + ">"; addFailure(new Exception(message, actual)); } } catch (Throwable e) { addFailure(e); } }
@Override public void invoke(final Object testFixture) throws IllegalAccessException, InvocationTargetException { super.invoke(testFixture); if (mockeryField != null) { mockeryOf(testFixture).assertIsSatisfied(); } } };
@Override public void invoke(final Object testFixture) throws IllegalAccessException, InvocationTargetException { super.invoke(testFixture); if (mockeryField != null) { mockeryOf(testFixture).assertIsSatisfied(); } } };