void runTestMethod(Statement methodInvoker, RunNotifier notifier) { Description methodDescription = describeMethod(); Description methodWithParams = findChildForParams(methodInvoker, methodDescription); notifier.fireTestStarted(methodWithParams); runMethodInvoker(notifier, methodDescription, methodInvoker, methodWithParams); notifier.fireTestFinished(methodWithParams); }
private void runMethodInvoker( RunNotifier notifier, Description description, Statement methodInvoker, Description methodWithParams) { try { methodInvoker.evaluate(); } catch (Throwable e) { notifier.fireTestFailure(new Failure(methodWithParams, e)); } }