Class GuiceyInterceptor

java.lang.Object
org.spockframework.runtime.extension.AbstractMethodInterceptor
ru.vyarus.dropwizard.guice.test.spock.ext.GuiceyInterceptor
All Implemented Interfaces:
org.spockframework.runtime.extension.IMethodInterceptor

public class GuiceyInterceptor extends org.spockframework.runtime.extension.AbstractMethodInterceptor
Leverages rules logic to start/stop application and injects Guice-provided objects into specifications.

Implementation is very similar to original spock-guice module.

Since:
02.01.2015
  • Constructor Details

    • GuiceyInterceptor

      public GuiceyInterceptor(org.spockframework.runtime.model.SpecInfo spec, GuiceyInterceptor.EnvironmentSupport support, List<ru.vyarus.dropwizard.guice.hook.GuiceyConfigurationHook> hooks)
  • Method Details

    • interceptSharedInitializerMethod

      public void interceptSharedInitializerMethod(org.spockframework.runtime.extension.IMethodInvocation invocation) throws Throwable
      Overrides:
      interceptSharedInitializerMethod in class org.spockframework.runtime.extension.AbstractMethodInterceptor
      Throws:
      Throwable
    • interceptInitializerMethod

      public void interceptInitializerMethod(org.spockframework.runtime.extension.IMethodInvocation invocation) throws Throwable
      Overrides:
      interceptInitializerMethod in class org.spockframework.runtime.extension.AbstractMethodInterceptor
      Throws:
      Throwable
    • interceptCleanupSpecMethod

      public void interceptCleanupSpecMethod(org.spockframework.runtime.extension.IMethodInvocation invocation) throws Throwable
      Overrides:
      interceptCleanupSpecMethod in class org.spockframework.runtime.extension.AbstractMethodInterceptor
      Throws:
      Throwable