Packages

class EmbeddedTwitterServer extends AdminHttpClient with BindDSL with Matchers

EmbeddedTwitterServer allows a com.twitter.server.TwitterServer serving http or thrift endpoints to be started locally (on ephemeral ports) and tested through it's http/thrift interfaces.

Note: All initialization fields are lazy to aid running multiple tests inside an IDE at the same time since IDEs typically "pre-construct" ALL the tests before running each one.

Linear Supertypes
Matchers, Explicitly, MatcherWords, ShouldVerb, Tolerance, Assertions, TripleEquals, TripleEqualsSupport, BindDSL, AdminHttpClient, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. EmbeddedTwitterServer
  2. Matchers
  3. Explicitly
  4. MatcherWords
  5. ShouldVerb
  6. Tolerance
  7. Assertions
  8. TripleEquals
  9. TripleEqualsSupport
  10. BindDSL
  11. AdminHttpClient
  12. AnyRef
  13. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Instance Constructors

  1. new EmbeddedTwitterServer(twitterServer: Ports, flags: Map[String, String], globalFlags: Map[GlobalFlag[_], String], stage: Stage)
  2. new EmbeddedTwitterServer(twitterServer: Ports, flags: Map[String, String], stage: Stage)
  3. new EmbeddedTwitterServer(twitterServer: server.TwitterServer, flags: => Map[String, String] = Map(), args: => Seq[String] = Seq(), waitForWarmup: Boolean = true, stage: Stage = Stage.DEVELOPMENT, useSocksProxy: Boolean = false, defaultRequestHeaders: Map[String, String] = Map(), streamResponse: Boolean = false, verbose: Boolean = false, disableTestLogging: Boolean = false, maxStartupTimeSeconds: Int = 60, failOnLintViolation: Boolean = false, closeGracePeriod: Option[Duration] = None, globalFlags: => Map[GlobalFlag[_], String] = Map(), statsReceiverOverride: Option[StatsReceiver] = None)

    twitterServer

    The com.twitter.server.TwitterServer to be started for testing.

    flags

    Command line flags (e.g. "foo"->"bar" is translated into -foo=bar). See: com.twitter.app.Flag.

    args

    Extra command line arguments.

    waitForWarmup

    Once the server is started, wait for server warmup to be completed

    stage

    com.google.inject.Stage used to create the server's injector. Since EmbeddedTwitterServer is used for testing, we default to Stage.DEVELOPMENT. This makes it possible to only mock objects that are used in a given test, at the expense of not checking that the entire object graph is valid. As such, you should always have at least one Stage.PRODUCTION test for your service (which eagerly creates all classes at startup)

    useSocksProxy

    Use a tunneled socks proxy for external service discovery/calls (useful for manually run external integration tests that connect to external services).

    defaultRequestHeaders

    Headers to always send to the embedded server.

    streamResponse

    Toggle to not unwrap response content body to allow caller to stream response.

    verbose

    Enable verbose logging during test runs.

    disableTestLogging

    Disable all logging emitted from the test infrastructure.

    maxStartupTimeSeconds

    Maximum seconds to wait for embedded server to start. If exceeded a com.twitter.inject.app.StartupTimeoutException is thrown.

    failOnLintViolation

    If server startup should fail due (and thus the test) to a detected lint rule issue after startup.

    closeGracePeriod

    An Optional grace period to use instead of the underlying server's defaultGracePeriod when closing the underlying server.

    globalFlags

    An ordered map of GlobalFlag and the desired value to be set during the scope of the underlying twitterServer's lifecycle. The flags will be applied in insertion order, with the first entry being applied closest to the startup of the twitterServer. In order to ensure insertion ordering, you should use a scala.collection.immutable.ListMap.

    statsReceiverOverride

    An optional StatsReceiver implementation that should be bound to the underlying server when testing with an injectable server. By default an injectable server under test will have an InMemoryStatsReceiver implementation bound for the purpose of testing. In some cases, users may want to test using a custom StatsReceiver implementation instead and can provide an instance to use here. For non-injectable servers this can be a shared reference used in the server under test.

Type Members

  1. final class AWord extends AnyRef
    Definition Classes
    Matchers
  2. final class AnWord extends AnyRef
    Definition Classes
    Matchers
  3. sealed class AnyShouldWrapper[T] extends AnyRef
    Definition Classes
    Matchers
  4. class CheckingEqualizer[L] extends AnyRef
    Definition Classes
    TripleEqualsSupport
  5. sealed class Collected extends Serializable
    Attributes
    protected
    Definition Classes
    Matchers
  6. class DecidedByEquality[A] extends Equality[A]
    Definition Classes
    Explicitly
  7. class DecidedWord extends AnyRef
    Definition Classes
    Explicitly
  8. class DeterminedByEquivalence[T] extends Equivalence[T]
    Definition Classes
    Explicitly
  9. class DeterminedWord extends AnyRef
    Definition Classes
    Explicitly
  10. class Equalizer[L] extends AnyRef
    Definition Classes
    TripleEqualsSupport
  11. final class HavePropertyMatcherGenerator extends AnyRef
    Definition Classes
    Matchers
  12. final class KeyWord extends AnyRef
    Definition Classes
    Matchers
  13. final class PlusOrMinusWrapper[T] extends AnyRef
    Definition Classes
    Tolerance
  14. final class RegexWord extends AnyRef
    Definition Classes
    Matchers
  15. final class RegexWrapper extends AnyRef
    Definition Classes
    Matchers
  16. class ResultOfBeWordForAny[T] extends AnyRef
    Definition Classes
    Matchers
  17. sealed class ResultOfBeWordForCollectedAny[T] extends AnyRef
    Definition Classes
    Matchers
  18. final class ResultOfBeWordForCollectedArray[T] extends ResultOfBeWordForCollectedAny[Array[T]]
    Definition Classes
    Matchers
  19. final class ResultOfCollectedAny[T] extends AnyRef
    Definition Classes
    Matchers
  20. final class ResultOfContainWordForCollectedAny[T] extends AnyRef
    Definition Classes
    Matchers
  21. final class ResultOfEndWithWordForCollectedString extends AnyRef
    Definition Classes
    Matchers
  22. final class ResultOfEndWithWordForString extends AnyRef
    Definition Classes
    Matchers
  23. final class ResultOfFullyMatchWordForCollectedString extends AnyRef
    Definition Classes
    Matchers
  24. final class ResultOfFullyMatchWordForString extends AnyRef
    Definition Classes
    Matchers
  25. final class ResultOfHaveWordForCollectedExtent[A] extends AnyRef
    Definition Classes
    Matchers
  26. final class ResultOfHaveWordForExtent[A] extends AnyRef
    Definition Classes
    Matchers
  27. final class ResultOfIncludeWordForCollectedString extends AnyRef
    Definition Classes
    Matchers
  28. final class ResultOfIncludeWordForString extends AnyRef
    Definition Classes
    Matchers
  29. final class ResultOfNotWordForCollectedAny[T] extends AnyRef
    Definition Classes
    Matchers
  30. final class ResultOfStartWithWordForCollectedString extends AnyRef
    Definition Classes
    Matchers
  31. final class ResultOfStartWithWordForString extends AnyRef
    Definition Classes
    Matchers
  32. final class StringShouldWrapper extends AnyShouldWrapper[String] with org.scalatest.matchers.should.Matchers.StringShouldWrapperForVerb
    Definition Classes
    Matchers
  33. trait StringShouldWrapperForVerb extends AnyRef
    Definition Classes
    ShouldVerb
  34. class TheAfterWord extends AnyRef
    Definition Classes
    Explicitly
  35. final class TheSameInstanceAsPhrase extends AnyRef
    Definition Classes
    Matchers
  36. final class ValueWord extends AnyRef
    Definition Classes
    Matchers

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. def !==[T](right: Spread[T]): TripleEqualsInvocationOnSpread[T]
    Definition Classes
    TripleEqualsSupport
  3. def !==(right: Null): TripleEqualsInvocation[Null]
    Definition Classes
    TripleEqualsSupport
  4. def !==[T](right: T): TripleEqualsInvocation[T]
    Definition Classes
    TripleEqualsSupport
  5. final def ##: Int
    Definition Classes
    AnyRef → Any
  6. def <[T](right: T)(implicit arg0: Ordering[T]): ResultOfLessThanComparison[T]
    Definition Classes
    Matchers
  7. def <=[T](right: T)(implicit arg0: Ordering[T]): ResultOfLessThanOrEqualToComparison[T]
    Definition Classes
    Matchers
  8. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  9. def ===[T](right: Spread[T]): TripleEqualsInvocationOnSpread[T]
    Definition Classes
    TripleEqualsSupport
  10. def ===(right: Null): TripleEqualsInvocation[Null]
    Definition Classes
    TripleEqualsSupport
  11. def ===[T](right: T): TripleEqualsInvocation[T]
    Definition Classes
    TripleEqualsSupport
  12. def >[T](right: T)(implicit arg0: Ordering[T]): ResultOfGreaterThanComparison[T]
    Definition Classes
    Matchers
  13. def >=[T](right: T)(implicit arg0: Ordering[T]): ResultOfGreaterThanOrEqualToComparison[T]
    Definition Classes
    Matchers
  14. val EmbeddedName: String
  15. def a[T](implicit arg0: ClassTag[T]): ResultOfATypeInvocation[T]
    Definition Classes
    Matchers
  16. val a: AWord
    Definition Classes
    Matchers
  17. def addAcceptHeader(accept: String, headers: Map[String, String]): Map[String, String]
    Attributes
    protected
    Definition Classes
    AdminHttpClient
  18. final def addInjectionServiceModule(module: Module): Unit
    Attributes
    protected
    Definition Classes
    EmbeddedTwitterServer → BindDSL
  19. lazy val adminHostAndPort: String
  20. def adminHttpServerRoutes: Seq[Route]
    Definition Classes
    AdminHttpClient
  21. val after: TheAfterWord
    Definition Classes
    Explicitly
  22. def all(xs: String)(implicit collecting: Collecting[Char, String], prettifier: Prettifier, pos: Position): ResultOfCollectedAny[Char]
    Definition Classes
    Matchers
  23. def all[K, V, JMAP[k, v] <: Map[k, v]](xs: JMAP[K, V])(implicit collecting: Collecting[Entry[K, V], JMAP[K, V]], prettifier: Prettifier, pos: Position): ResultOfCollectedAny[Entry[K, V]]
    Definition Classes
    Matchers
  24. def all[K, V, MAP[k, v] <: GenMap[k, v]](xs: MAP[K, V])(implicit collecting: Collecting[(K, V), GenTraversable[(K, V)]], prettifier: Prettifier, pos: Position): ResultOfCollectedAny[(K, V)]
    Definition Classes
    Matchers
  25. def all[E, C[_]](xs: C[E])(implicit collecting: Collecting[E, C[E]], prettifier: Prettifier, pos: Position): ResultOfCollectedAny[E]
    Definition Classes
    Matchers
  26. def allElementsOf[R](elements: GenTraversable[R]): ResultOfAllElementsOfApplication
    Definition Classes
    Matchers
  27. def allOf(firstEle: Any, secondEle: Any, remainingEles: Any*)(implicit pos: Position): ResultOfAllOfApplication
    Definition Classes
    Matchers
  28. def an[T](implicit arg0: ClassTag[T]): ResultOfAnTypeInvocation[T]
    Definition Classes
    Matchers
  29. val an: AnWord
    Definition Classes
    Matchers
  30. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  31. macro def assert(condition: Boolean, clue: Any)(implicit prettifier: Prettifier, pos: Position): Assertion
    Definition Classes
    Assertions
  32. macro def assert(condition: Boolean)(implicit prettifier: Prettifier, pos: Position): Assertion
    Definition Classes
    Assertions
  33. def assertCleanShutdown(): Unit

    Asserts that no NonFatal exception was caught while shutting down the underlying TwitterServer.

    Asserts that no NonFatal exception was caught while shutting down the underlying TwitterServer. If an exception occurred on close of the underlying server it will be thrown here.

  34. macro def assertCompiles(code: String)(implicit pos: Position): Assertion
    Definition Classes
    Assertions
  35. macro def assertDoesNotCompile(code: String)(implicit pos: Position): Assertion
    Definition Classes
    Assertions
  36. def assertHealthy(healthy: Boolean = true): Unit

    Assert that the underlying TwitterServer is "healthy".

    Assert that the underlying TwitterServer is "healthy". This will attempt to hit the AdminHttpInterface /health endpoint and expects an "OK\n" response body.

    This will throw a org.scalatest.exceptions.TestFailedException if the health assertion fails.

    healthy

    what value for health to assert, e.g., to assert that the server is "healthy", assertHealthy(healthy=true), Default is true.

    Note

    In almost no case is there a need to assertHealthy(healthy=false) as this would typically equate to the underlying server failing to startup -- which would result in a startup exception. If you want to build a wait-loop for the server to report itself as healthy, it is better to query the admin /health endpoint directly using isHealthy.

    See also

    isHealthy to determine the underlying TwitterServer health without an Exception.

  37. def assertResult(expected: Any)(actual: Any)(implicit prettifier: Prettifier, pos: Position): Assertion
    Definition Classes
    Assertions
  38. def assertResult(expected: Any, clue: Any)(actual: Any)(implicit prettifier: Prettifier, pos: Position): Assertion
    Definition Classes
    Assertions
  39. def assertStarted(started: Boolean = true): Unit

    Assert the underlying TwitterServer has started

  40. def assertThrows[T <: AnyRef](f: => Any)(implicit classTag: ClassTag[T], pos: Position): Assertion
    Definition Classes
    Assertions
  41. macro def assertTypeError(code: String)(implicit pos: Position): Assertion
    Definition Classes
    Assertions
  42. macro def assume(condition: Boolean, clue: Any)(implicit prettifier: Prettifier, pos: Position): Assertion
    Definition Classes
    Assertions
  43. macro def assume(condition: Boolean)(implicit prettifier: Prettifier, pos: Position): Assertion
    Definition Classes
    Assertions
  44. def atLeast(num: Int, xs: String)(implicit collecting: Collecting[Char, String], prettifier: Prettifier, pos: Position): ResultOfCollectedAny[Char]
    Definition Classes
    Matchers
  45. def atLeast[K, V, JMAP[k, v] <: Map[k, v]](num: Int, xs: JMAP[K, V])(implicit collecting: Collecting[Entry[K, V], JMAP[K, V]], prettifier: Prettifier, pos: Position): ResultOfCollectedAny[Entry[K, V]]
    Definition Classes
    Matchers
  46. def atLeast[K, V, MAP[k, v] <: GenMap[k, v]](num: Int, xs: MAP[K, V])(implicit collecting: Collecting[(K, V), GenTraversable[(K, V)]], prettifier: Prettifier, pos: Position): ResultOfCollectedAny[(K, V)]
    Definition Classes
    Matchers
  47. def atLeast[E, C[_]](num: Int, xs: C[E])(implicit collecting: Collecting[E, C[E]], prettifier: Prettifier, pos: Position): ResultOfCollectedAny[E]
    Definition Classes
    Matchers
  48. def atLeastOneElementOf(elements: GenTraversable[Any]): ResultOfAtLeastOneElementOfApplication
    Definition Classes
    Matchers
  49. def atLeastOneOf(firstEle: Any, secondEle: Any, remainingEles: Any*)(implicit pos: Position): ResultOfAtLeastOneOfApplication
    Definition Classes
    Matchers
  50. def atMost(num: Int, xs: String)(implicit collecting: Collecting[Char, String], prettifier: Prettifier, pos: Position): ResultOfCollectedAny[Char]
    Definition Classes
    Matchers
  51. def atMost[K, V, JMAP[k, v] <: Map[k, v]](num: Int, xs: JMAP[K, V])(implicit collecting: Collecting[Entry[K, V], JMAP[K, V]], prettifier: Prettifier, pos: Position): ResultOfCollectedAny[Entry[K, V]]
    Definition Classes
    Matchers
  52. def atMost[K, V, MAP[k, v] <: GenMap[k, v]](num: Int, xs: MAP[K, V])(implicit collecting: Collecting[(K, V), GenTraversable[(K, V)]], prettifier: Prettifier, pos: Position): ResultOfCollectedAny[(K, V)]
    Definition Classes
    Matchers
  53. def atMost[E, C[_]](num: Int, xs: C[E])(implicit collecting: Collecting[E, C[E]], prettifier: Prettifier, pos: Position): ResultOfCollectedAny[E]
    Definition Classes
    Matchers
  54. def atMostOneElementOf[R](elements: GenTraversable[R]): ResultOfAtMostOneElementOfApplication
    Definition Classes
    Matchers
  55. def atMostOneOf(firstEle: Any, secondEle: Any, remainingEles: Any*)(implicit pos: Position): ResultOfAtMostOneOfApplication
    Definition Classes
    Matchers
  56. val be: BeWord
    Definition Classes
    MatcherWords
  57. def between(from: Int, upTo: Int, xs: String)(implicit collecting: Collecting[Char, String], prettifier: Prettifier, pos: Position): ResultOfCollectedAny[Char]
    Definition Classes
    Matchers
  58. def between[K, V, JMAP[k, v] <: Map[k, v]](from: Int, upTo: Int, xs: JMAP[K, V])(implicit collecting: Collecting[Entry[K, V], JMAP[K, V]], prettifier: Prettifier, pos: Position): ResultOfCollectedAny[Entry[K, V]]
    Definition Classes
    Matchers
  59. def between[E, C[_]](from: Int, upTo: Int, xs: C[E])(implicit collecting: Collecting[E, C[E]], prettifier: Prettifier, pos: Position): ResultOfCollectedAny[E]
    Definition Classes
    Matchers
  60. def bind[T](implicit arg0: scala.reflect.api.JavaUniverse.TypeTag[T]): TypeDSL[T]
    Definition Classes
    BindDSL
  61. def bindClass[T, Ann <: Annotation, U <: T](clazz: Class[T], annotationClazz: Class[Ann], instanceClazz: Class[U]): EmbeddedTwitterServer.this.type
    Definition Classes
    EmbeddedTwitterServer → BindDSL
  62. def bindClass[T, U <: T](clazz: Class[T], annotation: Annotation, instanceClazz: Class[U]): EmbeddedTwitterServer.this.type
    Definition Classes
    EmbeddedTwitterServer → BindDSL
  63. def bindClass[T, U <: T](clazz: Class[T], instanceClazz: Class[U]): EmbeddedTwitterServer.this.type
    Definition Classes
    EmbeddedTwitterServer → BindDSL
  64. def bindClass[T, Ann <: Annotation](clazz: Class[T], annotationClazz: Class[Ann], instance: T): EmbeddedTwitterServer.this.type
    Definition Classes
    EmbeddedTwitterServer → BindDSL
  65. def bindClass[T](clazz: Class[T], annotation: Annotation, instance: T): EmbeddedTwitterServer.this.type
    Definition Classes
    EmbeddedTwitterServer → BindDSL
  66. def bindClass[T](clazz: Class[T], instance: T): EmbeddedTwitterServer.this.type
    Definition Classes
    EmbeddedTwitterServer → BindDSL
  67. def bindClass[T](clazz: Class[T]): ClassDSL[T]
    Definition Classes
    BindDSL
  68. def cancel(cause: Throwable)(implicit pos: Position): Nothing
    Definition Classes
    Assertions
  69. def cancel(message: String, cause: Throwable)(implicit pos: Position): Nothing
    Definition Classes
    Assertions
  70. def cancel(message: String)(implicit pos: Position): Nothing
    Definition Classes
    Assertions
  71. def cancel()(implicit pos: Position): Nothing
    Definition Classes
    Assertions
  72. def clearStats(): Unit

    Clears all metrics of the bound InMemoryStatsReceiver when applicable.

    Clears all metrics of the bound InMemoryStatsReceiver when applicable. If access to this method is attempted when a non InMemoryStatsReceiver is provided as a statsReceiverOverride this will throw an IllegalStateException as it is not expected that users call this when providing a custom StatsReceiver implementation via the statsReceiverOverride. Instead, users should prefer to clear stats from their custom StatsReceiver implementation by other means.

    Exceptions thrown

    IllegalStateException when a non InMemoryStatsReceiver is provided as a statsReceiverOverride.

  73. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native()
  74. def close(after: Duration): Unit

    Close the EmbeddedTwitterServer with the given timeout.

    Close the EmbeddedTwitterServer with the given timeout. This timeout is advisory, giving the callee some leeway, for example to drain clients or finish up other tasks. This closes the underlying TwitterServer, any other Closable instances registered with closeOnExit, and shuts down the FuturePool used to run the underlying TwitterServer. This method returns when all resources have been fully relinquished.

  75. def close(): Unit

    Close the EmbeddedTwitterServer.

    Close the EmbeddedTwitterServer. This closes the underlying TwitterServer, any other Closable instances registered with closeOnExit, and shuts down the FuturePool used to run the underlying TwitterServer. This method returns when all resources have been fully relinquished.

    See also

    Duration)

  76. def closeOnExit(closable: Closable): Unit

    Add the given Closable to the list of closables to be closed when the EmbeddedTwitterServer is closed

    Add the given Closable to the list of closables to be closed when the EmbeddedTwitterServer is closed

    Attributes
    protected
  77. def closed: Boolean
    Attributes
    protected[inject]
  78. def combineArgs(): Array[String]

    Combine the flags Map with the args String to create an argument list for the underlying embedded TwitterServer main

    Combine the flags Map with the args String to create an argument list for the underlying embedded TwitterServer main

    Attributes
    protected[twitter]
  79. val compile: CompileWord
    Definition Classes
    MatcherWords
  80. val contain: ContainWord
    Definition Classes
    MatcherWords
  81. def convertEquivalenceToAToBConstraint[A, B](equivalenceOfB: Equivalence[B])(implicit ev: <:<[A, B]): CanEqual[A, B]
    Definition Classes
    TripleEquals → TripleEqualsSupport
  82. def convertEquivalenceToBToAConstraint[A, B](equivalenceOfA: Equivalence[A])(implicit ev: <:<[B, A]): CanEqual[A, B]
    Definition Classes
    TripleEquals → TripleEqualsSupport
  83. implicit def convertNumericToPlusOrMinusWrapper[T](pivot: T)(implicit arg0: Numeric[T]): PlusOrMinusWrapper[T]
    Definition Classes
    Tolerance
  84. implicit def convertSymbolToHavePropertyMatcherGenerator(symbol: Symbol)(implicit prettifier: Prettifier, pos: Position): HavePropertyMatcherGenerator
    Definition Classes
    Matchers
  85. implicit def convertToAnyShouldWrapper[T](o: T)(implicit pos: Position, prettifier: Prettifier): AnyShouldWrapper[T]
    Definition Classes
    Matchers
  86. def convertToCheckingEqualizer[T](left: T): CheckingEqualizer[T]
    Definition Classes
    TripleEquals → TripleEqualsSupport
  87. implicit def convertToEqualizer[T](left: T): Equalizer[T]
    Definition Classes
    TripleEquals → TripleEqualsSupport
  88. implicit def convertToRegexWrapper(o: Regex): RegexWrapper
    Definition Classes
    Matchers
  89. implicit def convertToStringShouldWrapper(o: String)(implicit pos: Position, prettifier: Prettifier): StringShouldWrapper
    Definition Classes
    Matchers
  90. implicit def convertToStringShouldWrapperForVerb(o: String)(implicit position: Position): StringShouldWrapperForVerb
    Definition Classes
    ShouldVerb
  91. def createApiRequest(path: String, method: Method = Method.Get): Request
    Attributes
    protected
    Definition Classes
    AdminHttpClient
  92. val decided: DecidedWord
    Definition Classes
    Explicitly
  93. def defaultEquality[A]: Equality[A]
    Definition Classes
    TripleEqualsSupport
  94. val defaultRequestHeaders: Map[String, String]
  95. val defined: DefinedWord
    Definition Classes
    MatcherWords
  96. def definedAt[T](right: T): ResultOfDefinedAt[T]
    Definition Classes
    Matchers
  97. val determined: DeterminedWord
    Definition Classes
    Explicitly
  98. def disableLogging: Boolean
    Attributes
    protected
  99. val empty: EmptyWord
    Definition Classes
    MatcherWords
  100. val endWith: EndWithWord
    Definition Classes
    MatcherWords
  101. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  102. def equal(o: Null): Matcher[AnyRef]
    Definition Classes
    Matchers
  103. def equal[T](spread: Spread[T]): Matcher[T]
    Definition Classes
    Matchers
  104. def equal(right: Any): MatcherFactory1[Any, Equality]
    Definition Classes
    MatcherWords
  105. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  106. def every(xs: String)(implicit collecting: Collecting[Char, String], prettifier: Prettifier, pos: Position): ResultOfCollectedAny[Char]
    Definition Classes
    Matchers
  107. def every[K, V, JMAP[k, v] <: Map[k, v]](xs: JMAP[K, V])(implicit collecting: Collecting[Entry[K, V], JMAP[K, V]], prettifier: Prettifier, pos: Position): ResultOfCollectedAny[Entry[K, V]]
    Definition Classes
    Matchers
  108. def every[K, V, MAP[k, v] <: Map[k, v]](xs: MAP[K, V])(implicit collecting: Collecting[(K, V), GenTraversable[(K, V)]], prettifier: Prettifier, pos: Position): ResultOfCollectedAny[(K, V)]
    Definition Classes
    Matchers
  109. def every[E, C[_]](xs: C[E])(implicit collecting: Collecting[E, C[E]], prettifier: Prettifier, pos: Position): ResultOfCollectedAny[E]
    Definition Classes
    Matchers
  110. def exactly(num: Int, xs: String)(implicit collecting: Collecting[Char, String], prettifier: Prettifier, pos: Position): ResultOfCollectedAny[Char]
    Definition Classes
    Matchers
  111. def exactly[K, V, JMAP[k, v] <: Map[k, v]](num: Int, xs: JMAP[K, V])(implicit collecting: Collecting[Entry[K, V], JMAP[K, V]], prettifier: Prettifier, pos: Position): ResultOfCollectedAny[Entry[K, V]]
    Definition Classes
    Matchers
  112. def exactly[K, V, MAP[k, v] <: GenMap[k, v]](num: Int, xs: MAP[K, V])(implicit collecting: Collecting[(K, V), GenTraversable[(K, V)]], prettifier: Prettifier, pos: Position): ResultOfCollectedAny[(K, V)]
    Definition Classes
    Matchers
  113. def exactly[E, C[_]](num: Int, xs: C[E])(implicit collecting: Collecting[E, C[E]], prettifier: Prettifier, pos: Position): ResultOfCollectedAny[E]
    Definition Classes
    Matchers
  114. val exist: ExistWord
    Definition Classes
    MatcherWords
  115. def fail(cause: Throwable)(implicit pos: Position): Nothing
    Definition Classes
    Assertions
  116. def fail(message: String, cause: Throwable)(implicit pos: Position): Nothing
    Definition Classes
    Assertions
  117. def fail(message: String)(implicit pos: Position): Nothing
    Definition Classes
    Assertions
  118. def fail()(implicit pos: Position): Nothing
    Definition Classes
    Assertions
  119. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable])
  120. val fullyMatch: FullyMatchWord
    Definition Classes
    MatcherWords
  121. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  122. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  123. val have: HaveWord
    Definition Classes
    MatcherWords
  124. def healthResponse(expectedHealthy: Boolean = true): Try[Response]
    Definition Classes
    AdminHttpClient
  125. final lazy val httpAdminClient: EmbeddedHttpClient
    Definition Classes
    AdminHttpClient
  126. def httpAdminPort(): Int
  127. def httpGetAdmin(path: String, accept: String = null, headers: Map[String, String] = Map(), suppress: Boolean = false, andExpect: Status = Status.Ok, withLocation: String = null, withBody: String = null): Response
    Definition Classes
    AdminHttpClient
  128. def httpPostAdmin(path: String, accept: String = null, headers: Map[String, String] = Map(), suppress: Boolean = false, andExpect: Status = Status.Ok, withLocation: String = null, withBody: String = null): Response
    Definition Classes
    AdminHttpClient
  129. lazy val inMemoryStats: InMemoryStatsReceiverUtility

    Exceptions thrown

    IllegalStateException when a non InMemoryStatsReceiver is provided as a statsReceiverOverride.

  130. lazy val inMemoryStatsReceiver: InMemoryStatsReceiver

    Returns the bound InMemoryStatsReceiver when applicable.

    Returns the bound InMemoryStatsReceiver when applicable. If access to this member is attempted when a non InMemoryStatsReceiver is provided as a statsReceiverOverride this will throw an IllegalStateException as it is not expected that users call this when providing a custom StatsReceiver implementation via the statsReceiverOverride.

  131. def inOrder(firstEle: Any, secondEle: Any, remainingEles: Any*)(implicit pos: Position): ResultOfInOrderApplication
    Definition Classes
    Matchers
  132. def inOrderElementsOf[R](elements: GenTraversable[R]): ResultOfInOrderElementsOfApplication
    Definition Classes
    Matchers
  133. def inOrderOnly[T](firstEle: Any, secondEle: Any, remainingEles: Any*)(implicit pos: Position): ResultOfInOrderOnlyApplication
    Definition Classes
    Matchers
  134. val include: IncludeWord
    Definition Classes
    MatcherWords
  135. lazy val injectableServer: TwitterServer
  136. lazy val injector: Injector
  137. def intercept[T <: AnyRef](f: => Any)(implicit classTag: ClassTag[T], pos: Position): T
    Definition Classes
    Assertions
  138. def isHealthy: Boolean

    Determines if the underlying TwitterServer is "healthy".

    Determines if the underlying TwitterServer is "healthy". This will attempt to hit the AdminHttpInterface /health endpoint and expects an "OK\n" response body.

    returns

    True is the server is "healthy", False otherwise.

  139. lazy val isInjectable: Boolean
  140. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  141. def isStarted: Boolean

    If the underlying embedded TwitterServer has started.

    If the underlying embedded TwitterServer has started.

    returns

    True if the server has started, False otherwise.

  142. val key: KeyWord
    Definition Classes
    Matchers
  143. val length: LengthWord
    Definition Classes
    MatcherWords
  144. def logStartup(): Unit

    Log that the underlying embedded TwitterServer has started and the location of the AdminHttpInterface

    Log that the underlying embedded TwitterServer has started and the location of the AdminHttpInterface

    Attributes
    protected[twitter]
  145. def lowPriorityTypeCheckedConstraint[A, B](implicit equivalenceOfB: Equivalence[B], ev: <:<[A, B]): CanEqual[A, B]
    Definition Classes
    TripleEquals → TripleEqualsSupport
  146. def mainResult: Future[Unit]

    Returns the result of running the nonExitingMain of the underlying TwitterServer in the embedded Future Pool.

  147. val matchPattern: MatchPatternWord
    Definition Classes
    MatcherWords
  148. def message(expectedMessage: String): ResultOfMessageWordApplication
    Definition Classes
    Matchers
  149. val name: String
  150. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  151. def no(xs: String)(implicit collecting: Collecting[Char, String], prettifier: Prettifier, pos: Position): ResultOfCollectedAny[Char]
    Definition Classes
    Matchers
  152. def no[K, V, JMAP[k, v] <: Map[k, v]](xs: JMAP[K, V])(implicit collecting: Collecting[Entry[K, V], JMAP[K, V]], prettifier: Prettifier, pos: Position): ResultOfCollectedAny[Entry[K, V]]
    Definition Classes
    Matchers
  153. def no[E, C[_]](xs: C[E])(implicit collecting: Collecting[E, C[E]], prettifier: Prettifier, pos: Position): ResultOfCollectedAny[E]
    Definition Classes
    Matchers
  154. def noElementsOf(elements: GenTraversable[Any]): ResultOfNoElementsOfApplication
    Definition Classes
    Matchers
  155. def noException(implicit pos: Position): NoExceptionWord
    Definition Classes
    MatcherWords
  156. def noneOf(firstEle: Any, secondEle: Any, remainingEles: Any*)(implicit pos: Position): ResultOfNoneOfApplication
    Definition Classes
    Matchers
  157. val not: NotWord
    Definition Classes
    MatcherWords
  158. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  159. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  160. def of[T](implicit ev: ClassTag[T]): ResultOfOfTypeInvocation[T]
    Definition Classes
    Matchers
  161. def oneElementOf(elements: GenTraversable[Any]): ResultOfOneElementOfApplication
    Definition Classes
    Matchers
  162. def oneOf(firstEle: Any, secondEle: Any, remainingEles: Any*)(implicit pos: Position): ResultOfOneOfApplication
    Definition Classes
    Matchers
  163. def only(xs: Any*)(implicit pos: Position): ResultOfOnlyApplication
    Definition Classes
    Matchers
  164. def pending: Assertion with PendingStatement
    Definition Classes
    Assertions
  165. def pendingUntilFixed(f: => Unit)(implicit pos: Position): Assertion with PendingStatement
    Definition Classes
    Assertions
  166. def printStats(): Unit

    Prints stats from the bound InMemoryStatsReceiver when applicable.

    Prints stats from the bound InMemoryStatsReceiver when applicable. If access to this method is attempted when a non InMemoryStatsReceiver is provided as a statsReceiverOverride this will throw an IllegalStateException as it is not expected that users call this when providing a custom StatsReceiver implementation via the statsReceiverOverride. Instead, users should prefer to print stats from their custom StatsReceiver implementation by other means.

    Exceptions thrown

    IllegalStateException when a non InMemoryStatsReceiver is provided as a statsReceiverOverride.

  167. val readable: ReadableWord
    Definition Classes
    MatcherWords
  168. val regex: RegexWord
    Definition Classes
    Matchers
  169. val size: SizeWord
    Definition Classes
    MatcherWords
  170. val sorted: SortedWord
    Definition Classes
    MatcherWords
  171. def start(): Unit

    Start the underlying TwitterServer.

    Start the underlying TwitterServer.

    Note

    Start is called in various places to "lazily start the server" as needed.

  172. val startWith: StartWithWord
    Definition Classes
    MatcherWords
  173. lazy val statsReceiver: StatsReceiver

    Returns the StatsReceiver for the underlying server when applicable

  174. val streamResponse: Boolean
  175. final val succeed: Assertion
    Definition Classes
    Assertions
  176. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  177. def the[T](implicit arg0: ClassTag[T], pos: Position): ResultOfTheTypeInvocation[T]
    Definition Classes
    Matchers
  178. def theSameElementsAs(xs: GenTraversable[_]): ResultOfTheSameElementsAsApplication
    Definition Classes
    Matchers
  179. def theSameElementsInOrderAs(xs: GenTraversable[_]): ResultOfTheSameElementsInOrderAsApplication
    Definition Classes
    Matchers
  180. val theSameInstanceAs: TheSameInstanceAsPhrase
    Definition Classes
    Matchers
  181. def thrownBy(fun: => Any): ResultOfThrownByApplication
    Definition Classes
    Matchers
  182. def toString(): String
    Definition Classes
    AnyRef → Any
  183. val typeCheck: TypeCheckWord
    Definition Classes
    MatcherWords
  184. def typeCheckedConstraint[A, B](implicit equivalenceOfA: Equivalence[A], ev: <:<[B, A]): CanEqual[A, B]
    Definition Classes
    TripleEquals → TripleEqualsSupport
  185. implicit def unconstrainedEquality[A, B](implicit equalityOfA: Equality[A]): CanEqual[A, B]
    Definition Classes
    TripleEquals → TripleEqualsSupport
  186. lazy val usesInMemoryStatsReceiver: Boolean
  187. val value: ValueWord
    Definition Classes
    Matchers
  188. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  189. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  190. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  191. def withClue[T](clue: Any)(fun: => T): T
    Definition Classes
    Assertions
  192. def withLocals(fn: => Unit): Unit

    A method that allows for applying com.twitter.util.Local context (e.g.

    A method that allows for applying com.twitter.util.Local context (e.g. com.twitter.app.GlobalFlag) scoped to the execution of the underlying twitterServer's lifecycle.

    fn

    The main function that will take into account local scope modifications

    Attributes
    protected[twitter]
    Example:
    1. override protected[twitter] def withLocals(fn: => Unit): Unit = super.withLocals {
        SomeLocal.let("xyz")(fn)
      }
    Note

    Ordering of com.twitter.util.Local context scoping is important. The scope closest to the fn param is going to win, if there are conflicts.

  193. val writable: WritableWord
    Definition Classes
    MatcherWords

Deprecated Value Members

  1. def assertCounter(name: String)(callback: (Long) => Boolean): Unit

    Annotations
    @deprecated
    Deprecated

    (Since version 2019-05-17) Use the inMemoryStatsReceiverUtility#counters#assert

    Exceptions thrown

    IllegalStateException when a non InMemoryStatsReceiver is provided as a statsReceiverOverride.

  2. def assertCounter(name: String, expected: Long): Unit

    Annotations
    @deprecated
    Deprecated

    (Since version 2019-05-17) Use the inMemoryStatsReceiverUtility#counters#assert

    Exceptions thrown

    IllegalStateException when a non InMemoryStatsReceiver is provided as a statsReceiverOverride.

  3. def assertGauge(name: String, expected: Float): Unit

    Annotations
    @deprecated
    Deprecated

    (Since version 2019-05-17) Use the inMemoryStatsReceiverUtility#gauges#assert

    Exceptions thrown

    IllegalStateException when a non InMemoryStatsReceiver is provided as a statsReceiverOverride.

  4. def assertStat(name: String, expected: Seq[Float]): Unit

    Annotations
    @deprecated
    Deprecated

    (Since version 2019-05-17) Use the inMemoryStatsReceiverUtility#stats#assert

    Exceptions thrown

    IllegalStateException when a non InMemoryStatsReceiver is provided as a statsReceiverOverride.

  5. def conversionCheckedConstraint[A, B](implicit equivalenceOfA: Equivalence[A], cnv: (B) => A): CanEqual[A, B]
    Definition Classes
    TripleEquals → TripleEqualsSupport
    Annotations
    @deprecated
    Deprecated

    (Since version 3.1.0) The conversionCheckedConstraint method has been deprecated and will be removed in a future version of ScalaTest. It is no longer needed now that the deprecation period of ConversionCheckedTripleEquals has expired. It will not be replaced.

  6. def convertEquivalenceToAToBConversionConstraint[A, B](equivalenceOfB: Equivalence[B])(implicit ev: (A) => B): CanEqual[A, B]
    Definition Classes
    TripleEquals → TripleEqualsSupport
    Annotations
    @deprecated
    Deprecated

    (Since version 3.1.0) The convertEquivalenceToAToBConversionConstraint method has been deprecated and will be removed in a future version of ScalaTest. It is no longer needed now that the deprecation period of ConversionCheckedTripleEquals has expired. It will not be replaced.

  7. def convertEquivalenceToBToAConversionConstraint[A, B](equivalenceOfA: Equivalence[A])(implicit ev: (B) => A): CanEqual[A, B]
    Definition Classes
    TripleEquals → TripleEqualsSupport
    Annotations
    @deprecated
    Deprecated

    (Since version 3.1.0) The convertEquivalenceToBToAConversionConstraint method has been deprecated and will be removed in a future version of ScalaTest. It is no longer needed now that the deprecation period of ConversionCheckedTripleEquals has expired. It will not be replaced.

  8. def countersMap: SortedMap[String, Long]

    Annotations
    @deprecated
    Deprecated

    (Since version 2019-05-17) Use the inMemoryStatsReceiverUtility#countersMap directly

    Exceptions thrown

    IllegalStateException when a non InMemoryStatsReceiver is provided as a statsReceiverOverride.

  9. def gaugeMap: SortedMap[String, () => Float]

    Annotations
    @deprecated
    Deprecated

    (Since version 2019-05-17) Use the inMemoryStatsReceiverUtility#gaugeMap directly

    Exceptions thrown

    IllegalStateException when a non InMemoryStatsReceiver is provided as a statsReceiverOverride.

  10. def getCounter(name: String): Long

    Annotations
    @deprecated
    Deprecated

    (Since version 2019-05-17) Use the inMemoryStatsReceiverUtility#counters#apply

    Exceptions thrown

    IllegalStateException when a non InMemoryStatsReceiver is provided as a statsReceiverOverride.

  11. def getGauge(name: String): Float

    Annotations
    @deprecated
    Deprecated

    (Since version 2019-05-17) Use the inMemoryStatsReceiverUtility#gauges#apply

    Exceptions thrown

    IllegalStateException when a non InMemoryStatsReceiver is provided as a statsReceiverOverride.

  12. def getStat(name: String): Seq[Float]

    Annotations
    @deprecated
    Deprecated

    (Since version 2019-05-17) Use the inMemoryStatsReceiverUtility#stats#apply

    Exceptions thrown

    IllegalStateException when a non InMemoryStatsReceiver is provided as a statsReceiverOverride.

  13. def lowPriorityConversionCheckedConstraint[A, B](implicit equivalenceOfB: Equivalence[B], cnv: (A) => B): CanEqual[A, B]
    Definition Classes
    TripleEquals → TripleEqualsSupport
    Annotations
    @deprecated
    Deprecated

    (Since version 3.1.0) The lowPriorityConversionCheckedConstraint method has been deprecated and will be removed in a future version of ScalaTest. It is no longer needed now that the deprecation period of ConversionCheckedTripleEquals has expired. It will not be replaced.

  14. def printStats(includeGauges: Boolean): Unit

    Prints stats from the bound InMemoryStatsReceiver when applicable.

    Prints stats from the bound InMemoryStatsReceiver when applicable. If access to this method is attempted when a non InMemoryStatsReceiver is provided as a statsReceiverOverride this will throw an IllegalStateException as it is not expected that users call this when providing a custom StatsReceiver implementation via the statsReceiverOverride.

    Instead users should prefer to print stats from their custom StatsReceiver implementation by other means.

    Annotations
    @deprecated
    Deprecated

    (Since version 2019-05-17) Use printStats(). The includeGauges parameter is ignored and gauge values will now always be printed from the underlying InMemoryStatsReceiver.

    Exceptions thrown

    IllegalStateException when a non InMemoryStatsReceiver is provided as a statsReceiverOverride.

  15. def statsMap: SortedMap[String, Seq[Float]]

    Annotations
    @deprecated
    Deprecated

    (Since version 2019-05-17) Use the inMemoryStatsReceiverUtility#statsMap directly

    Exceptions thrown

    IllegalStateException when a non InMemoryStatsReceiver is provided as a statsReceiverOverride.

Inherited from Matchers

Inherited from Explicitly

Inherited from MatcherWords

Inherited from ShouldVerb

Inherited from Tolerance

Inherited from Assertions

Inherited from TripleEquals

Inherited from TripleEqualsSupport

Inherited from BindDSL

Inherited from AdminHttpClient

Inherited from AnyRef

Inherited from Any

Ungrouped