Packages

class TestInjector extends AnyRef

A com.google.inject.Injector usable for testing. Note, it is expected that construction of the TestInjector happens within a single thread as private state is mutated on creation.

See also

https://twitter.github.io/finatra/user-guide/testing/index.html#integration-tests

Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. TestInjector
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new TestInjector(modules: Seq[Module], flags: Map[String, String] = Map.empty, overrideModules: Seq[Module] = Seq.empty, stage: Stage = Stage.DEVELOPMENT)

    modules

    - a list of com.google.inject.Module

    flags

    - a String Map of flag arguments to set on the injector, default is empty.

    overrideModules

    - a list of com.google.inject.Module to use as overrides, default is empty.

    stage

    - the com.google.inject.Stage to use, default is DEVELOPMENT.

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def bind[T, A <: Annotation](instance: T)(implicit arg0: scala.reflect.api.JavaUniverse.TypeTag[T], arg1: scala.reflect.api.JavaUniverse.TypeTag[A]): TestInjector

    Bind an instance of type [T] annotated with Annotation type [A] to the object graph of this injector.

    Bind an instance of type [T] annotated with Annotation type [A] to the object graph of this injector. This will REPLACE any previously bound instance of the given type bound with the given annotation type.

    T

    - type of the instance to bind.

    A

    - type of the Annotation used to bind the instance.

    instance

    - to bind instance.

    returns

    this TestInjector.

    See also

    https://twitter.github.io/finatra/user-guide/testing/index.html#integration-tests

  6. def bind[T](instance: T)(implicit arg0: scala.reflect.api.JavaUniverse.TypeTag[T]): TestInjector

    Bind an instance of type [T] to the object graph of this injector.

    Bind an instance of type [T] to the object graph of this injector. This will REPLACE any previously bound instance of the given type.

    T

    - type of the instance to bind.

    instance

    - to bind instance.

    returns

    this TestInjector.

    See also

    https://twitter.github.io/finatra/user-guide/testing/index.html#integration-tests

  7. def clone(): AnyRef
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  8. def create: Injector

    Creates a new com.google.inject.Injector from this TestInjector.

    Creates a new com.google.inject.Injector from this TestInjector.

    returns

    a new com.google.inject.Injector.

    See also

    https://twitter.github.io/finatra/user-guide/testing/index.html#integration-tests

  9. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  10. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  11. def finalize(): Unit
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  12. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
  13. def hashCode(): Int
    Definition Classes
    AnyRef → Any
  14. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  15. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  16. final def notify(): Unit
    Definition Classes
    AnyRef
  17. final def notifyAll(): Unit
    Definition Classes
    AnyRef
  18. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  19. def toString(): String
    Definition Classes
    AnyRef → Any
  20. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  21. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  22. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from AnyRef

Inherited from Any

Ungrouped