Class

akka.http.javadsl.testkit

TestRouteResult

Related Doc: package testkit

Permalink

abstract class TestRouteResult extends AnyRef

A wrapper for route results.

To support the testkit API, a third-party testing library needs to implement this class and provide implementations for the abstract assertion methods.

Source
TestRouteResult.scala
Linear Supertypes
Type Hierarchy
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. TestRouteResult
  2. AnyRef
  3. Any
Implicitly
  1. by any2stringadd
  2. by StringFormat
  3. by Ensuring
  4. by ArrowAssoc
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new TestRouteResult(_result: RouteResult, awaitAtMost: FiniteDuration)(implicit ec: ExecutionContext, materializer: Materializer)

    Permalink

Abstract Value Members

  1. abstract def assertEquals(expected: Int, actual: Int, message: String): Unit

    Permalink
    Attributes
    protected
  2. abstract def assertEquals(expected: AnyRef, actual: AnyRef, message: String): Unit

    Permalink
    Attributes
    protected
  3. abstract def assertTrue(predicate: Boolean, message: String): Unit

    Permalink
    Attributes
    protected
  4. abstract def fail(message: String): Unit

    Permalink
    Attributes
    protected

Concrete Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. def +(other: String): String

    Permalink
    Implicit information
    This member is added by an implicit conversion from TestRouteResult to any2stringadd[TestRouteResult] performed by method any2stringadd in scala.Predef.
    Definition Classes
    any2stringadd
  4. def ->[B](y: B): (TestRouteResult, B)

    Permalink
    Implicit information
    This member is added by an implicit conversion from TestRouteResult to ArrowAssoc[TestRouteResult] performed by method ArrowAssoc in scala.Predef.
    Definition Classes
    ArrowAssoc
    Annotations
    @inline()
  5. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  6. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  7. def assertContentType(expected: ContentType): TestRouteResult

    Permalink

    Assert on the content type of the response.

  8. def assertContentType(expected: String): TestRouteResult

    Permalink

    Assert on the content type of the response.

  9. def assertEntity(expected: String): TestRouteResult

    Permalink

    Assert on the response entity to be a UTF8 representation of the given string.

  10. def assertEntityAs[T <: AnyRef](unmarshaller: Unmarshaller[HttpEntity, T], expected: T): TestRouteResult

    Permalink

    Assert on the response entity to equal the given object after applying an akka.http.javadsl.unmarshalling.Unmarshaller.

  11. def assertEntityBytes(expected: ByteString): TestRouteResult

    Permalink

    Assert on the response entity to equal the given bytes.

  12. def assertEqualsKind(expected: Int, actual: Int, kind: String): TestRouteResult

    Permalink
    Attributes
    protected
  13. def assertEqualsKind(expected: AnyRef, actual: AnyRef, kind: String): TestRouteResult

    Permalink
    Attributes
    protected
  14. def assertHeaderExists(expected: HttpHeader): TestRouteResult

    Permalink

    Assert that a given header instance exists in the response.

  15. def assertHeaderExists(name: String, value: String): TestRouteResult

    Permalink

    Assert that a header of the given name and value exists.

  16. def assertHeaderKindExists(name: String): TestRouteResult

    Permalink

    Assert that a header of the given type exists.

  17. def assertHeaderKindNotExists(name: String): TestRouteResult

    Permalink

    Assert that a header of the given type does not exist.

  18. def assertMediaType(expected: MediaType): TestRouteResult

    Permalink

    Assert on the media type of the response.

  19. def assertMediaType(expected: String): TestRouteResult

    Permalink

    Assert on the media type of the response.

  20. def assertRejections(expectedRejections: Rejection*): TestRouteResult

    Permalink
    Annotations
    @varargs()
  21. def assertStatusCode(expected: StatusCode): TestRouteResult

    Permalink

    Assert on the status code.

  22. def assertStatusCode(expected: Int): TestRouteResult

    Permalink

    Assert on the numeric status code.

  23. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  24. def contentType: ContentType

    Permalink

    Returns the response's content-type

  25. def contentTypeString: String

    Permalink

    Returns a string representation of the response's content-type

  26. def ensuring(cond: (TestRouteResult) ⇒ Boolean, msg: ⇒ Any): TestRouteResult

    Permalink
    Implicit information
    This member is added by an implicit conversion from TestRouteResult to Ensuring[TestRouteResult] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  27. def ensuring(cond: (TestRouteResult) ⇒ Boolean): TestRouteResult

    Permalink
    Implicit information
    This member is added by an implicit conversion from TestRouteResult to Ensuring[TestRouteResult] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  28. def ensuring(cond: Boolean, msg: ⇒ Any): TestRouteResult

    Permalink
    Implicit information
    This member is added by an implicit conversion from TestRouteResult to Ensuring[TestRouteResult] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  29. def ensuring(cond: Boolean): TestRouteResult

    Permalink
    Implicit information
    This member is added by an implicit conversion from TestRouteResult to Ensuring[TestRouteResult] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  30. def entity[T](unmarshaller: Unmarshaller[HttpEntity, T]): T

    Permalink

    Returns the entity of the response unmarshalled with the given Unmarshaller.

  31. lazy val entity: Strict

    Permalink

    Returns the strictified entity of the response.

    Returns the strictified entity of the response. It will be strictified on first access.

  32. def entityBytes: ByteString

    Permalink

    Returns the bytes of the response entity

  33. def entityString: String

    Permalink

    Returns the entity of the response interpreted as an UTF-8 encoded string.

  34. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  35. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  36. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  37. def formatted(fmtstr: String): String

    Permalink
    Implicit information
    This member is added by an implicit conversion from TestRouteResult to StringFormat[TestRouteResult] performed by method StringFormat in scala.Predef.
    Definition Classes
    StringFormat
    Annotations
    @inline()
  38. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  39. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  40. def header[T >: Null <: HttpHeader](clazz: Class[T]): T

    Permalink

    Returns the first header of the response which is of the given class.

  41. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  42. def mediaType: MediaType

    Permalink

    Returns the media-type of the the response's content-type

  43. def mediaTypeString: String

    Permalink

    Returns a string representation of the media-type of the response's content-type

  44. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  45. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  46. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  47. def rejection: Rejection

    Permalink

    Expects the route to have been rejected with a single rejection.

    Expects the route to have been rejected with a single rejection. Fails the test if the route completes with a response, or is rejected with 0 or >1 rejections.

  48. def rejections: List[Rejection]

    Permalink

    Expects the route to have been rejected, returning the list of rejections, or empty list if the route was rejected with an empty rejection list.

    Expects the route to have been rejected, returning the list of rejections, or empty list if the route was rejected with an empty rejection list. Fails the test if the route completes with a response rather than having been rejected.

  49. lazy val response: HttpResponse

    Permalink

    Returns a copy of the underlying response with the strictified entity.

  50. def status: StatusCode

    Permalink

    Returns the akka.http.javadsl.model.StatusCode of the response.

  51. def statusCode: Int

    Permalink

    Returns the numeric status code of the response.

  52. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  53. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  54. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  55. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  56. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  57. def [B](y: B): (TestRouteResult, B)

    Permalink
    Implicit information
    This member is added by an implicit conversion from TestRouteResult to ArrowAssoc[TestRouteResult] performed by method ArrowAssoc in scala.Predef.
    Definition Classes
    ArrowAssoc

Inherited from AnyRef

Inherited from Any

Inherited by implicit conversion any2stringadd from TestRouteResult to any2stringadd[TestRouteResult]

Inherited by implicit conversion StringFormat from TestRouteResult to StringFormat[TestRouteResult]

Inherited by implicit conversion Ensuring from TestRouteResult to Ensuring[TestRouteResult]

Inherited by implicit conversion ArrowAssoc from TestRouteResult to ArrowAssoc[TestRouteResult]

Ungrouped