@Override public void intercept(IMethodInvocation invocation) throws Throwable { handleInvocation(invocation); } }
@Override public void visitSpecAnnotation(Annotation annotation, final SpecInfo spec) { sortFeaturesInDeclarationOrder(spec); includeFeaturesBeforeLastIncludedFeature(spec); skipFeaturesAfterFirstFailingFeature(spec); }
@Override public void visitSpecAnnotation(IgnoreIf annotation, SpecInfo spec) { doVisit(annotation, spec); }
@Override public void visitSpec(SpecInfo spec) { handleSpecIncludes(spec, config.include); handleSpecExcludes(spec, config.exclude); if (spec.isExcluded()) excludeAllFeatures(spec); handleFeatureIncludes(spec, config.include); handleFeatureExcludes(spec, config.exclude); if (spec.isExcluded() && !allFeaturesExcluded(spec)) spec.setExcluded(false); }
@Override public void visitFixtureAnnotation(FailsWith failsWith, MethodInfo fixtureMethod) { checkRefersToException(failsWith); fixtureMethod.addInterceptor(new FailsWithInterceptor(failsWith)); }
protected boolean isExpected(IMethodInvocation invocation, Throwable failure) { return hasExpectedClass(failure) && satisfiesCondition(invocation, failure); }
private boolean noSubSpecWithRetryAnnotation(SpecInfo spec) { if (spec == null) { return true; } return noRetryAnnotation(spec) && noSubSpecWithRetryAnnotation(spec.getSubSpec()); }
@Override public void visitSpecAnnotation(Requires annotation, SpecInfo spec) { doVisit(annotation, spec); }
@Override public void visitSpecAnnotation(Issue issue, SpecInfo spec) { addTags(issue, spec); }
@Override public void visitSpecAnnotation(See see, SpecInfo spec) { addAttachments(see, spec); }
@Override public void visitFixtureAnnotation(Use annotation, MethodInfo fixtureMethod) { addInterceptor(annotation, fixtureMethod); }
@Override public void afterSpec(SpecInfo spec) { if (specRestorations.isEmpty()) return; revertMetaClassesFromAndClear(specLevelSavedMetaClasses); }
/** * Returns the current JVM's system properties. * * @return the current JVM's system properties * * @deprecated use {@link #getSys()} instead */ @Deprecated public Properties getProperties() { return getSys(); }
@Override public void visitFeatureAnnotation(FailsWith failsWith, FeatureInfo feature) { checkRefersToException(failsWith); feature.getFeatureMethod().addInterceptor(new FailsWithInterceptor(failsWith)); }
@Override public void visitFeatureAnnotation(IgnoreIf annotation, FeatureInfo feature) { doVisit(annotation, feature); }
@Override public void visitFeatureAnnotation(Requires annotation, FeatureInfo feature) { doVisit(annotation, feature); }
@Override public void visitFeatureAnnotation(Issue issue, FeatureInfo feature) { addTags(issue, feature); }
@Override public void visitFeatureAnnotation(See see, FeatureInfo feature) { addAttachments(see, feature); }