private Object invokeMethodAndNotifyFailures(Object obj, Method method, Object[] args, MethodProxy proxy, Object result) throws Throwable { try { result = invokeMethod(obj, args, proxy); } catch (Throwable generalException) { error = generalException; Throwable assertionError = forError(error).convertToAssertion(); notifyStepStarted(method, args); notifyOfStepFailure(method, args, assertionError); } return result; }
public void reportMethodError(Throwable generalException, Object obj, Method method, Object[] args) throws Throwable { error = SerenityManagedException.detachedCopyOf(generalException); Throwable assertionError = forError(error).convertToAssertion(); notifyStepStarted(obj, method, args); notifyOfStepFailure(obj, method, args, assertionError); }
private Object runOrSkipMethod(Object obj, Method method, Object[] args, MethodProxy proxy) throws Throwable { Object result; if (shouldSkip(method) && !stepIsCalledFromCleanupMethod()) { result = skipStepMethod(obj, method, args, proxy); } else { notifyStepStarted(obj, method, args); result = runTestStep(obj, method, args, proxy); } return result; }
private Object invokeMethodAndNotifyFailures(Object obj, Method method, Object[] args, MethodProxy proxy, Object result) throws Throwable { try { result = invokeMethod(obj, args, proxy); } catch (Throwable generalException) { error = SerenityWebDriverException.detachedCopyOf(generalException); Throwable assertionError = forError(error).convertToAssertion(); notifyStepStarted(method, args); notifyOfStepFailure(method, args, assertionError); } return result; }
private Object testStepResult(final Object obj, final Method method, final Object[] args, final MethodProxy proxy) throws Throwable { if (!isATestStep(method)) { return runNormalMethod(obj, method, args, proxy); } if (shouldSkip(method)) { notifySkippedStepStarted(method, args); return skipTestStep(obj, method, args, proxy); } else { notifyStepStarted(method, args); return runTestStep(obj, method, args, proxy); } }
private Object testStepResult(final Object obj, final Method method, final Object[] args, final MethodProxy proxy) throws Throwable { if (!isATestStep(method)) { return runNormalMethod(obj, method, args, proxy); } if (shouldSkip(method)) { notifySkippedStepStarted(method, args); return skipTestStep(obj, method, args, proxy); } else { notifyStepStarted(method, args); return runTestStep(obj, method, args, proxy); } }