Object appropriateReturnObject(final Object returnedValue, final Object obj, final Method method) { if (returnedValue != null) { return returnedValue; } else { return appropriateReturnObject(obj, method); } }
private Object appropriateReturnObject(final Object returnedValue, final Object obj, final Method method) { if (returnedValue != null) { return returnedValue; } else { return appropriateReturnObject(obj, method); } }
Object appropriateReturnObject(final Object returnedValue, final Object obj, final Method method) { if (returnedValue != null) { return returnedValue; } else { return appropriateReturnObject(obj, method); } }
private Object skipTestStep(Object obj, Method method, Object[] args, MethodProxy proxy) throws Exception { Object skippedReturnObject = runSkippedMethod(obj, method, args, proxy); notifyStepSkippedFor(method, args); LOGGER.info("SKIPPED STEP: {}", method.getName()); return appropriateReturnObject(skippedReturnObject, obj, method); }
private Object skipTestStep(Object obj, Method method, Object[] args, MethodProxy proxy) throws Exception { Object skippedReturnObject = runSkippedMethod(obj, method, args, proxy); notifyStepSkippedFor(method, args); LOGGER.info("SKIPPED STEP: {}", method.getName()); return appropriateReturnObject(skippedReturnObject, obj, method); }
private Object skipTestStep(Object obj, Method method, Object[] args, MethodProxy proxy) throws Exception { Object skippedReturnObject = runSkippedMethod(obj, method, args, proxy); notifyStepSkippedFor(method, args); LOGGER.debug("SKIPPED STEP: {}", StepName.fromStepAnnotationIn(method).orElse(method.getName())); return appropriateReturnObject(skippedReturnObject, obj, method); }
private Object runTestStep(final Object obj, final Method method, final Object[] args, final MethodProxy proxy) throws Throwable { LOGGER.info("STARTING STEP: {}", method.getName()); Object result = null; try { result = executeTestStepMethod(obj, method, args, proxy, result); LOGGER.info("STEP DONE: {}", method.getName()); } catch (AssertionError failedAssertion) { error = failedAssertion; logStepFailure(method, args, failedAssertion); return appropriateReturnObject(obj, method); } catch (AssumptionViolatedException assumptionFailed) { return appropriateReturnObject(obj, method); } catch (Throwable testErrorException) { error = testErrorException; logStepFailure(method, args, forError(error).convertToAssertion()); return appropriateReturnObject(obj, method); } return result; }
private Object runTestStep(final Object obj, final Method method, final Object[] args, final MethodProxy proxy) throws Throwable { String callingClass = testContext(); LOGGER.info("STARTING STEP: {} - {}", callingClass, method.getName()); Object result = null; try { result = executeTestStepMethod(obj, method, args, proxy, result); LOGGER.info("STEP DONE: {}", method.getName()); } catch (AssertionError failedAssertion) { error = failedAssertion; logStepFailure(method, args, failedAssertion); result = appropriateReturnObject(obj, method); } catch (AssumptionViolatedException assumptionFailed) { result = appropriateReturnObject(obj, method); } catch (Throwable testErrorException) { error = SerenityWebDriverException.detachedCopyOf(testErrorException); logStepFailure(method, args, forError(error).convertToAssertion()); result = appropriateReturnObject(obj, method); } return result; }
private Object runTestStep(final Object obj, final Method method, final Object[] args, final MethodProxy proxy) throws Throwable { String callingClass = testContext(); LOGGER.debug("STARTING STEP: {} - {}", callingClass, StepName.fromStepAnnotationIn(method).orElse(method.getName())); Object result = null; try { result = executeTestStepMethod(obj, method, args, proxy, result); LOGGER.debug("STEP DONE: {}", StepName.fromStepAnnotationIn(method).orElse(method.getName())); } catch (AssertionError failedAssertion) { error = failedAssertion; logStepFailure(obj, method, args, failedAssertion); result = appropriateReturnObject(obj, method); } catch (AssumptionViolatedException assumptionFailed) { result = appropriateReturnObject(obj, method); } catch (Throwable testErrorException) { error = SerenityManagedException.detachedCopyOf(testErrorException); logStepFailure(obj, method, args, forError(error).convertToAssertion()); result = appropriateReturnObject(obj, method); } return result; }
private Object skipStepMethod(final Object obj, Method method, final Object[] args, final MethodProxy proxy) throws Exception { if ((aPreviousStepHasFailed() || testAssumptionViolated()) && (!shouldExecuteNestedStepsAfterFailures())) { notifySkippedStepStarted(obj, method, args); notifySkippedStepFinishedFor(method, args); return appropriateReturnObject(obj, method); } else { notifySkippedStepStarted(obj, method, args); return skipTestStep(obj, method, args, proxy); } }