GuiceAnnotatedEmbedderRunner.java

  1. package org.jbehave.core.junit.guice;

  2. import org.jbehave.core.configuration.AnnotationBuilder;
  3. import org.jbehave.core.configuration.guice.GuiceAnnotationBuilder;
  4. import org.jbehave.core.junit.AnnotatedEmbedderRunner;
  5. import org.junit.runners.model.InitializationError;

  6. /**
  7.  * AnnotatedEmbedderRunner that uses {@link GuiceAnnotationBuilder}.
  8.  */
  9. public class GuiceAnnotatedEmbedderRunner extends AnnotatedEmbedderRunner {

  10.     private GuiceAnnotationBuilder annotationBuilder;

  11.     public GuiceAnnotatedEmbedderRunner(Class<?> testClass) throws InitializationError {
  12.         super(testClass);
  13.         this.annotationBuilder = new GuiceAnnotationBuilder(testClass());
  14.     }

  15.     @Override
  16.     public AnnotationBuilder annotationBuilder() {
  17.         return annotationBuilder;
  18.     }

  19. }