@Override public void evaluate() throws Throwable { invocation.proceed(); } };
public Void doCall(Object[] args) throws Throwable { invocation.proceed(); return null; } });
@Override public void intercept(IMethodInvocation invocation) throws Throwable { Properties original = new Properties(); original.putAll(System.getProperties()); try { invocation.proceed(); } finally { System.setProperties(original); } } }
@Override public void interceptSetupSpecMethod(IMethodInvocation invocation) throws Throwable { manager.beforeTestClass(); invocation.proceed(); }
@Override public void interceptCleanupSpecMethod(IMethodInvocation invocation) throws Throwable { try { invocation.proceed(); } finally { shutdownRegistry(); } }
@Override public void interceptSetupSpecMethod(IMethodInvocation invocation) throws Throwable { listener.beforeTestClass(invocation.getSharedInstance().getClass()); invocation.proceed(); }
@Override public void interceptFeatureExecution(IMethodInvocation invocation) throws Throwable { currentFeature = invocation.getMethod().getFeature(); try { invocation.proceed(); } finally { currentFeature = null; } } }
@Override public void interceptInitializerMethod(IMethodInvocation invocation) throws Throwable { injectServices(invocation.getInstance(), false); invocation.proceed(); }
@Override public void interceptInitializerMethod(IMethodInvocation invocation) throws Throwable { invocation.proceed(); // needs to run before so that mocks are already initialized manager.prepareTestInstance(invocation.getInstance()); }
@Override public void interceptInitializerMethod(IMethodInvocation invocation) throws Throwable { injectValues(invocation.getInstance(), false, (Specification)invocation.getInstance()); invocation.proceed(); }
@Override public void intercept(IMethodInvocation invocation) throws Throwable { Object mock = field.readValue(invocation.getInstance()); MOCK_UTIL.detachMock(mock); invocation.proceed(); } }
@Override public void intercept(IMethodInvocation invocation) throws Throwable { AtomicBoolean pass = new AtomicBoolean(false); invocation.getFeature().getFeatureMethod().addInterceptor( new InnerIterationInterceptor(pass, expectedExceptions, reason)); invocation.proceed(); if (pass.get()) { throw assumptionViolation(); } else { throw featurePassedUnexpectedly(); } }
@Override public void interceptCleanupMethod(IMethodInvocation invocation) throws Throwable { try { invocation.proceed(); } finally { listener.afterTestTearDown(invocation.getInstance(), currentFeature.getFeatureMethod().getReflection()); } }
@Override public void interceptSharedInitializerMethod(IMethodInvocation invocation) throws Throwable { createInjector(); injectValues(invocation.getSharedInstance(), true, (Specification)invocation.getInstance()); invocation.proceed(); }
@Override public void intercept(IMethodInvocation invocation) throws Throwable { try { invocation.proceed(); } catch (AssertionError e) { throw assumptionViolation(); } catch (Throwable e) { if (isExpected(e)) { throw assumptionViolation(); } else { throw e; } } throw featurePassedUnexpectedly(); }
@Override public void intercept(IMethodInvocation invocation) throws Throwable { Object value = field.readValue(invocation.getInstance()); value = getUltimateTargetObject(value); if (value != null) { field.writeValue(invocation.getInstance(), value); } invocation.proceed(); } }
@Override public void interceptSetupMethod(IMethodInvocation invocation) throws Throwable { exception = null; beforeTestMethodInvoked = true; manager.beforeTestMethod(invocation.getInstance(), invocation.getFeature().getFeatureMethod().getReflection()); invocation.proceed(); }
@Override public void interceptSharedInitializerMethod(IMethodInvocation invocation) throws Throwable { runBeforeRegistryCreatedMethods((Specification) invocation.getSharedInstance()); createAndStartupRegistry(); injectServices(invocation.getSharedInstance(), true); invocation.proceed(); }
@Override public void intercept(IMethodInvocation invocation) throws Throwable { try { invocation.proceed(); } catch (Throwable t) { if (checkException(t)) return; throw new WrongExceptionThrownError(failsWith.value(), t); } throw new WrongExceptionThrownError(failsWith.value(), null); }
@Override public void interceptSetupMethod(IMethodInvocation invocation) throws Throwable { listener.afterCreateTestObject(invocation.getInstance()); listener.beforeTestSetUp(invocation.getInstance(), currentFeature.getFeatureMethod().getReflection()); invocation.proceed(); }