Packages

object TestInjector

A com.google.inject.Injector usable for testing. This injector can be used for constructing a minimal object graph for use in integration tests. The TestInjector supports modules, flags, override modules and a bind[T] DSL (for easily replacing bound instances without using an override module).

Usage is typically through extension of the com.twitter.inject.IntegrationTest (or com.twitter.inject.IntegrationTestMixin) which expects a defined com.google.inject.Injector which can be created by TestInjector#create.

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

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. def apply(modules: Seq[Module], flags: Map[String, String] = Map.empty, overrideModules: Seq[Module] = Seq.empty, stage: Stage = Stage.DEVELOPMENT): TestInjector

    Creates a new TestInjector with the specified params.

    Creates a new TestInjector with the specified params.

    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.

    returns

    a new TestInjector

    See also

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

  5. def apply(modules: Module*): TestInjector

    Creates a new TestInjector over the given list of com.google.inject.Module

    Creates a new TestInjector over the given list of com.google.inject.Module

    modules

    - a variable list of com.google.inject.Module

    returns

    a new TestInjector

    See also

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

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

Inherited from AnyRef

Inherited from Any

Ungrouped