play.api.test

Helpers

object Helpers extends PlayRunners with HeaderNames with Status with DefaultAwaitTimeout with ResultExtractors with Writeables with RouteInvokers with WsTestClient with FutureAwaits

Source
Helpers.scala
Linear Supertypes
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Helpers
  2. FutureAwaits
  3. WsTestClient
  4. RouteInvokers
  5. Writeables
  6. ResultExtractors
  7. DefaultAwaitTimeout
  8. Status
  9. HeaderNames
  10. PlayRunners
  11. AnyRef
  12. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Value Members

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

    Definition Classes
    AnyRef
  2. final def !=(arg0: Any): Boolean

    Definition Classes
    Any
  3. final def ##(): Int

    Definition Classes
    AnyRef → Any
  4. final def ==(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  5. final def ==(arg0: Any): Boolean

    Definition Classes
    Any
  6. val ACCEPT: String

    Definition Classes
    HeaderNames
  7. val ACCEPTED: Int

    Definition Classes
    Status
  8. val ACCEPT_CHARSET: String

    Definition Classes
    HeaderNames
  9. val ACCEPT_ENCODING: String

    Definition Classes
    HeaderNames
  10. val ACCEPT_LANGUAGE: String

    Definition Classes
    HeaderNames
  11. val ACCEPT_RANGES: String

    Definition Classes
    HeaderNames
  12. val ACCESS_CONTROL_ALLOW_CREDENTIALS: String

    Definition Classes
    HeaderNames
  13. val ACCESS_CONTROL_ALLOW_HEADERS: String

    Definition Classes
    HeaderNames
  14. val ACCESS_CONTROL_ALLOW_METHODS: String

    Definition Classes
    HeaderNames
  15. val ACCESS_CONTROL_ALLOW_ORIGIN: String

    Definition Classes
    HeaderNames
  16. val ACCESS_CONTROL_EXPOSE_HEADERS: String

    Definition Classes
    HeaderNames
  17. val ACCESS_CONTROL_MAX_AGE: String

    Definition Classes
    HeaderNames
  18. val ACCESS_CONTROL_REQUEST_HEADERS: String

    Definition Classes
    HeaderNames
  19. val ACCESS_CONTROL_REQUEST_METHOD: String

    Definition Classes
    HeaderNames
  20. val AGE: String

    Definition Classes
    HeaderNames
  21. val ALLOW: String

    Definition Classes
    HeaderNames
  22. val AUTHORIZATION: String

    Definition Classes
    HeaderNames
  23. val BAD_GATEWAY: Int

    Definition Classes
    Status
  24. val BAD_REQUEST: Int

    Definition Classes
    Status
  25. val CACHE_CONTROL: String

    Definition Classes
    HeaderNames
  26. val CHUNKED: String

    Definition Classes
    HeaderNames
  27. val CONFLICT: Int

    Definition Classes
    Status
  28. val CONNECTION: String

    Definition Classes
    HeaderNames
  29. val CONTENT_DISPOSITION: String

    Definition Classes
    HeaderNames
  30. val CONTENT_ENCODING: String

    Definition Classes
    HeaderNames
  31. val CONTENT_LANGUAGE: String

    Definition Classes
    HeaderNames
  32. val CONTENT_LENGTH: String

    Definition Classes
    HeaderNames
  33. val CONTENT_LOCATION: String

    Definition Classes
    HeaderNames
  34. val CONTENT_MD5: String

    Definition Classes
    HeaderNames
  35. val CONTENT_RANGE: String

    Definition Classes
    HeaderNames
  36. val CONTENT_TRANSFER_ENCODING: String

    Definition Classes
    HeaderNames
  37. val CONTENT_TYPE: String

    Definition Classes
    HeaderNames
  38. val CONTINUE: Int

    Definition Classes
    Status
  39. val COOKIE: String

    Definition Classes
    HeaderNames
  40. val CREATED: Int

    Definition Classes
    Status
  41. val DATE: String

    Definition Classes
    HeaderNames
  42. val DELETE: String

    Definition Classes
    PlayRunners
  43. val ETAG: String

    Definition Classes
    HeaderNames
  44. val EXPECT: String

    Definition Classes
    HeaderNames
  45. val EXPECTATION_FAILED: Int

    Definition Classes
    Status
  46. val EXPIRES: String

    Definition Classes
    HeaderNames
  47. val FAILED_DEPENDENCY: Int

    Definition Classes
    Status
  48. val FIREFOX: Class[FirefoxDriver]

    Definition Classes
    PlayRunners
  49. val FORBIDDEN: Int

    Definition Classes
    Status
  50. val FOUND: Int

    Definition Classes
    Status
  51. val FROM: String

    Definition Classes
    HeaderNames
  52. val GATEWAY_TIMEOUT: Int

    Definition Classes
    Status
  53. val GET: String

    Definition Classes
    PlayRunners
  54. val GONE: Int

    Definition Classes
    Status
  55. val HEAD: String

    Definition Classes
    PlayRunners
  56. val HOST: String

    Definition Classes
    HeaderNames
  57. val HTMLUNIT: Class[HtmlUnitDriver]

    Definition Classes
    PlayRunners
  58. val HTTP_VERSION_NOT_SUPPORTED: Int

    Definition Classes
    Status
  59. val IF_MATCH: String

    Definition Classes
    HeaderNames
  60. val IF_MODIFIED_SINCE: String

    Definition Classes
    HeaderNames
  61. val IF_NONE_MATCH: String

    Definition Classes
    HeaderNames
  62. val IF_RANGE: String

    Definition Classes
    HeaderNames
  63. val IF_UNMODIFIED_SINCE: String

    Definition Classes
    HeaderNames
  64. val INSUFFICIENT_STORAGE: Int

    Definition Classes
    Status
  65. val INTERNAL_SERVER_ERROR: Int

    Definition Classes
    Status
  66. val LAST_MODIFIED: String

    Definition Classes
    HeaderNames
  67. val LENGTH_REQUIRED: Int

    Definition Classes
    Status
  68. val LOCATION: String

    Definition Classes
    HeaderNames
  69. val LOCKED: Int

    Definition Classes
    Status
  70. val MAX_FORWARDS: String

    Definition Classes
    HeaderNames
  71. val METHOD_NOT_ALLOWED: Int

    Definition Classes
    Status
  72. val MOVED_PERMANENTLY: Int

    Definition Classes
    Status
  73. val MULTIPLE_CHOICES: Int

    Definition Classes
    Status
  74. val MULTI_STATUS: Int

    Definition Classes
    Status
  75. val NON_AUTHORITATIVE_INFORMATION: Int

    Definition Classes
    Status
  76. val NOT_ACCEPTABLE: Int

    Definition Classes
    Status
  77. val NOT_FOUND: Int

    Definition Classes
    Status
  78. val NOT_IMPLEMENTED: Int

    Definition Classes
    Status
  79. val NOT_MODIFIED: Int

    Definition Classes
    Status
  80. val NO_CONTENT: Int

    Definition Classes
    Status
  81. val OK: Int

    Definition Classes
    Status
  82. val ORIGIN: String

    Definition Classes
    HeaderNames
  83. val PARTIAL_CONTENT: Int

    Definition Classes
    Status
  84. val PAYMENT_REQUIRED: Int

    Definition Classes
    Status
  85. val POST: String

    Definition Classes
    PlayRunners
  86. val PRAGMA: String

    Definition Classes
    HeaderNames
  87. val PRECONDITION_FAILED: Int

    Definition Classes
    Status
  88. val PROXY_AUTHENTICATE: String

    Definition Classes
    HeaderNames
  89. val PROXY_AUTHENTICATION_REQUIRED: Int

    Definition Classes
    Status
  90. val PROXY_AUTHORIZATION: String

    Definition Classes
    HeaderNames
  91. val PUT: String

    Definition Classes
    PlayRunners
  92. val RANGE: String

    Definition Classes
    HeaderNames
  93. val REFERER: String

    Definition Classes
    HeaderNames
  94. val REQUESTED_RANGE_NOT_SATISFIABLE: Int

    Definition Classes
    Status
  95. val REQUEST_ENTITY_TOO_LARGE: Int

    Definition Classes
    Status
  96. val REQUEST_TIMEOUT: Int

    Definition Classes
    Status
  97. val REQUEST_URI_TOO_LONG: Int

    Definition Classes
    Status
  98. val RESET_CONTENT: Int

    Definition Classes
    Status
  99. val RETRY_AFTER: String

    Definition Classes
    HeaderNames
  100. val SEE_OTHER: Int

    Definition Classes
    Status
  101. val SERVER: String

    Definition Classes
    HeaderNames
  102. val SERVICE_UNAVAILABLE: Int

    Definition Classes
    Status
  103. val SET_COOKIE: String

    Definition Classes
    HeaderNames
  104. val SET_COOKIE2: String

    Definition Classes
    HeaderNames
  105. val SWITCHING_PROTOCOLS: Int

    Definition Classes
    Status
  106. val TE: String

    Definition Classes
    HeaderNames
  107. val TEMPORARY_REDIRECT: Int

    Definition Classes
    Status
  108. val TOO_MANY_REQUEST: Int

    Definition Classes
    Status
  109. val TRAILER: String

    Definition Classes
    HeaderNames
  110. val TRANSFER_ENCODING: String

    Definition Classes
    HeaderNames
  111. val UNAUTHORIZED: Int

    Definition Classes
    Status
  112. val UNPROCESSABLE_ENTITY: Int

    Definition Classes
    Status
  113. val UNSUPPORTED_MEDIA_TYPE: Int

    Definition Classes
    Status
  114. val UPGRADE: String

    Definition Classes
    HeaderNames
  115. val USER_AGENT: String

    Definition Classes
    HeaderNames
  116. val USE_PROXY: Int

    Definition Classes
    Status
  117. val VARY: String

    Definition Classes
    HeaderNames
  118. val VIA: String

    Definition Classes
    HeaderNames
  119. val WARNING: String

    Definition Classes
    HeaderNames
  120. val WWW_AUTHENTICATE: String

    Definition Classes
    HeaderNames
  121. val X_FORWARDED_FOR: String

    Definition Classes
    HeaderNames
  122. val X_FORWARDED_HOST: String

    Definition Classes
    HeaderNames
  123. val X_FORWARDED_PORT: String

    Definition Classes
    HeaderNames
  124. val X_FORWARDED_PROTO: String

    Definition Classes
    HeaderNames
  125. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  126. def await[T](future: Future[T], timeout: Long, unit: TimeUnit = TimeUnit.MILLISECONDS): T

    Block until a Promise is redeemed with the specified timeout.

    Block until a Promise is redeemed with the specified timeout.

    Definition Classes
    FutureAwaits
  127. def await[T](future: Future[T])(implicit timeout: Timeout): T

    Block until a Promise is redeemed.

    Block until a Promise is redeemed.

    Definition Classes
    FutureAwaits
  128. def charset(of: Future[SimpleResult])(implicit timeout: Timeout): Option[String]

    Extracts the Charset of this Result value.

    Extracts the Charset of this Result value.

    Definition Classes
    ResultExtractors
  129. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  130. def contentAsBytes(of: Future[SimpleResult])(implicit timeout: Timeout): Array[Byte]

    Extracts the content as bytes.

    Extracts the content as bytes.

    Definition Classes
    ResultExtractors
  131. def contentAsBytes(of: Content)(implicit timeout: Timeout): Array[Byte]

    Extracts the content as bytes.

    Extracts the content as bytes.

    Definition Classes
    ResultExtractors
  132. def contentAsJson(of: Future[SimpleResult])(implicit timeout: Timeout): JsValue

    Extracts the content as Json.

    Extracts the content as Json.

    Definition Classes
    ResultExtractors
  133. def contentAsJson(of: Content)(implicit timeout: Timeout): JsValue

    Extracts the content as Json.

    Extracts the content as Json.

    Definition Classes
    ResultExtractors
  134. def contentAsString(of: Future[SimpleResult])(implicit timeout: Timeout): String

    Extracts the content as String.

    Extracts the content as String.

    Definition Classes
    ResultExtractors
  135. def contentAsString(of: Content)(implicit timeout: Timeout): String

    Extracts the content as String.

    Extracts the content as String.

    Definition Classes
    ResultExtractors
  136. def contentType(of: Future[SimpleResult])(implicit timeout: Timeout): Option[String]

    Extracts the Content-Type of this Result value.

    Extracts the Content-Type of this Result value.

    Definition Classes
    ResultExtractors
  137. def contentType(of: Content)(implicit timeout: Timeout): String

    Extracts the Content-Type of this Content value.

    Extracts the Content-Type of this Content value.

    Definition Classes
    ResultExtractors
  138. def cookies(of: Future[SimpleResult])(implicit timeout: Timeout): Cookies

    Extracts the Cookies of this Result value.

    Extracts the Cookies of this Result value.

    Definition Classes
    ResultExtractors
  139. implicit def defaultAwaitTimeout: Timeout

    The default await timeout.

    The default await timeout. Override this to change it.

    Definition Classes
    DefaultAwaitTimeout
  140. final def eq(arg0: AnyRef): Boolean

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

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

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  143. def flash(of: Future[SimpleResult])(implicit timeout: Timeout): Flash

    Extracts the Flash values of this Result value.

    Extracts the Flash values of this Result value.

    Definition Classes
    ResultExtractors
  144. final def getClass(): Class[_]

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

    Definition Classes
    AnyRef → Any
  146. def header(header: String, of: Future[SimpleResult])(implicit timeout: Timeout): Option[String]

    Extracts an Header value of this Result value.

    Extracts an Header value of this Result value.

    Definition Classes
    ResultExtractors
  147. def headers(of: Future[SimpleResult])(implicit timeout: Timeout): Map[String, String]

    Extracts all Headers of this Result value.

    Extracts all Headers of this Result value.

    Definition Classes
    ResultExtractors
  148. def inMemoryDatabase(name: String = "default", options: Map[String, String] = Map.empty[String, String]): Map[String, String]

    Constructs a in-memory (h2) database configuration to add to a FakeApplication.

    Constructs a in-memory (h2) database configuration to add to a FakeApplication.

    Definition Classes
    PlayRunners
  149. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  150. def jRoute[T](app: Application, r: FakeRequest[T]): Option[Future[SimpleResult]]

    Definition Classes
    RouteInvokers
  151. def jRoute(rh: RequestHeader, body: Array[Byte]): Option[Future[SimpleResult]]

    Definition Classes
    RouteInvokers
  152. def jRoute(app: Application, rh: RequestHeader, body: Array[Byte]): Option[Future[SimpleResult]]

    Definition Classes
    RouteInvokers
  153. def jRoute(app: Application, rh: RequestHeader): Option[Future[SimpleResult]]

    Definition Classes
    RouteInvokers
  154. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  155. final def notify(): Unit

    Definition Classes
    AnyRef
  156. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  157. def redirectLocation(of: Future[SimpleResult])(implicit timeout: Timeout): Option[String]

    Extracts the Location header of this Result value if this Result is a Redirect.

    Extracts the Location header of this Result value if this Result is a Redirect.

    Definition Classes
    ResultExtractors
  158. def route[T](req: Request[T])(implicit w: Writeable[T]): Option[Future[SimpleResult]]

    Use the Router to determine the Action to call for this request and execute it.

    Use the Router to determine the Action to call for this request and execute it.

    The body is serialised using the implicit writable, so that the action body parser can deserialise it.

    Definition Classes
    RouteInvokers
  159. def route[T](app: Application, req: Request[T])(implicit w: Writeable[T]): Option[Future[SimpleResult]]

    Use the Router to determine the Action to call for this request and execute it.

    Use the Router to determine the Action to call for this request and execute it.

    The body is serialised using the implicit writable, so that the action body parser can deserialise it.

    Definition Classes
    RouteInvokers
  160. def route[T](rh: RequestHeader, body: T)(implicit w: Writeable[T]): Option[Future[SimpleResult]]

    Use the Router to determine the Action to call for this request and execute it.

    Use the Router to determine the Action to call for this request and execute it.

    The body is serialised using the implicit writable, so that the action body parser can deserialise it.

    Definition Classes
    RouteInvokers
  161. def route[T](app: Application, rh: RequestHeader, body: T)(implicit w: Writeable[T]): Option[Future[SimpleResult]]

    Use the Router to determine the Action to call for this request and execute it.

    Use the Router to determine the Action to call for this request and execute it.

    The body is serialised using the implicit writable, so that the action body parser can deserialise it.

    Definition Classes
    RouteInvokers
  162. def running[T, WEBDRIVER <: WebDriver](testServer: TestServer, webDriver: Class[WEBDRIVER])(block: (TestBrowser) ⇒ T): T

    Executes a block of code in a running server, with a test browser.

    Executes a block of code in a running server, with a test browser.

    Definition Classes
    PlayRunners
  163. def running[T](testServer: TestServer)(block: ⇒ T): T

    Executes a block of code in a running server.

    Executes a block of code in a running server.

    Definition Classes
    PlayRunners
  164. def running[T](fakeApp: FakeApplication)(block: ⇒ T): T

    Executes a block of code in a running application.

    Executes a block of code in a running application.

    Definition Classes
    PlayRunners
  165. def session(of: Future[SimpleResult])(implicit timeout: Timeout): Session

    Extracts the Session of this Result value.

    Extracts the Session of this Result value. Extracts the Session from this Result value.

    Definition Classes
    ResultExtractors
  166. def status(of: Future[SimpleResult])(implicit timeout: Timeout): Int

    Extracts the Status code of this Result value.

    Extracts the Status code of this Result value.

    Definition Classes
    ResultExtractors
  167. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  168. lazy val testServerPort: Int

    The port to use for a test server.

    The port to use for a test server. Defaults to 19001. May be configured using the system property testserver.port

    Definition Classes
    PlayRunners
  169. def toString(): String

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

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  173. implicit def writeableOf_AnyContentAsEmpty(implicit code: Codec): Writeable[AnyContentAsEmpty.type]

    Definition Classes
    Writeables
  174. implicit def writeableOf_AnyContentAsFormUrlEncoded(implicit code: Codec): Writeable[AnyContentAsFormUrlEncoded]

    Definition Classes
    Writeables
  175. implicit def writeableOf_AnyContentAsJson(implicit codec: Codec): Writeable[AnyContentAsJson]

    Definition Classes
    Writeables
  176. implicit def writeableOf_AnyContentAsRaw: Writeable[AnyContentAsRaw]

    Definition Classes
    Writeables
  177. implicit def writeableOf_AnyContentAsText(implicit code: Codec): Writeable[AnyContentAsText]

    Definition Classes
    Writeables
  178. implicit def writeableOf_AnyContentAsXml(implicit codec: Codec): Writeable[AnyContentAsXml]

    Definition Classes
    Writeables
  179. def wsCall(call: Call)(implicit port: Port): WSRequestHolder

    Construct a WS request for the given reverse route.

    Construct a WS request for the given reverse route.

    For example:

    wsCall(controllers.routes.Application.index()).get()
    Definition Classes
    WsTestClient
  180. def wsUrl(url: String)(implicit port: Port): WSRequestHolder

    Construct a WS request for the given relative URL.

    Construct a WS request for the given relative URL.

    Definition Classes
    WsTestClient

Deprecated Value Members

  1. def routeAndCall[T, ROUTER <: core.Router.Routes](router: Class[ROUTER], request: FakeRequest[T])(implicit timeout: Timeout): Option[Future[SimpleResult]]

    Use the Router to determine the Action to call for this request and executes it.

    Use the Router to determine the Action to call for this request and executes it.

    Definition Classes
    RouteInvokers
    Annotations
    @deprecated
    Deprecated

    (Since version 2.1.0) Use route instead.

  2. def routeAndCall[T](request: FakeRequest[T])(implicit timeout: Timeout): Option[Future[SimpleResult]]

    Use the Router to determine the Action to call for this request and executes it.

    Use the Router to determine the Action to call for this request and executes it.

    Definition Classes
    RouteInvokers
    Annotations
    @deprecated
    Deprecated

    (Since version 2.1.0) Use route instead.

Inherited from FutureAwaits

Inherited from WsTestClient

Inherited from RouteInvokers

Inherited from Writeables

Inherited from ResultExtractors

Inherited from DefaultAwaitTimeout

Inherited from Status

Inherited from HeaderNames

Inherited from PlayRunners

Inherited from AnyRef

Inherited from Any

Ungrouped