Package org.spockframework.runtime

Examples of org.spockframework.runtime.AbstractRunListener


     * @param spec
     */
    @Override
    public void visitSpec(SpecInfo spec) {

        spec.addListener(new AbstractRunListener() {

            @Override
            public void beforeSpec(SpecInfo spec) {
                if (!spec.getReflection().isAnnotationPresent(OverrideFeatures.class)) {
                    LOG.debug("File {} is not annotated for overriding methods", spec.getName());
View Full Code Here


      topSpec.getCleanupMethod().addInterceptor(interceptor);
      topSpec.getCleanupSpecMethod().addInterceptor(interceptor);

      // set the last created Spec, so we can call AfterSuite only when this is done.
      lastCreatedSpec = topSpec;
      topSpec.addListener(new AbstractRunListener()
      {
         @Override
         public void afterSpec(SpecInfo spec)
         {
            if(spec == lastCreatedSpec)
View Full Code Here

    }
    if (logClientListener != null) {
      spec.addListener(logClientListener);
    }
    if (logWriterListener != null || logClientListener != null) {
      spec.addListener(new AbstractRunListener() {
        @Override
        public void beforeSpec(SpecInfo theSpec) {
          streamsCapturer.start();
        }
      });
View Full Code Here

   
    final SpecRunHistory history = new SpecRunHistory(spec.getReflection().getName());
    safeLoadFromDisk(history);
    history.sortFeatures(spec);

    spec.addListener(new AbstractRunListener() {
      long specStarted;
      long featureStarted;
      boolean errorOccurred;

      @Override
View Full Code Here

      else if (!feature.isExcluded()) includeRemaining = true;
    }
  }

  private void skipFeaturesAfterFirstFailingFeature(final SpecInfo spec) {
    spec.getBottomSpec().addListener(new AbstractRunListener() {
      public void error(ErrorInfo error) {
        // @Stepwise only affects class that carries the annotation,
        // but not sub- and super classes
        if (!error.getMethod().getParent().equals(spec)) return;
View Full Code Here

    if (!handleProfileValues(spec)) return;

    SpringTestContextManager manager = new SpringTestContextManager(spec.getReflection());
    final SpringInterceptor interceptor = new SpringInterceptor(manager);
   
    spec.addListener(new AbstractRunListener() {
      public void error(ErrorInfo error) {
        interceptor.error(error);
      }
    });
View Full Code Here

TOP

Related Classes of org.spockframework.runtime.AbstractRunListener

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.