play.api.test

Helpers

object Helpers extends PlayRunners with HeaderNames with Status with HttpProtocol 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. HttpProtocol
  9. Status
  10. HeaderNames
  11. PlayRunners
  12. AnyRef
  13. 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
    HttpProtocol
  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_1_0: String

    Definition Classes
    HttpProtocol
  59. val HTTP_1_1: String

    Definition Classes
    HttpProtocol
  60. val HTTP_VERSION_NOT_SUPPORTED: Int

    Definition Classes
    Status
  61. val IF_MATCH: String

    Definition Classes
    HeaderNames
  62. val IF_MODIFIED_SINCE: String

    Definition Classes
    HeaderNames
  63. val IF_NONE_MATCH: String

    Definition Classes
    HeaderNames
  64. val IF_RANGE: String

    Definition Classes
    HeaderNames
  65. val IF_UNMODIFIED_SINCE: String

    Definition Classes
    HeaderNames
  66. val INSUFFICIENT_STORAGE: Int

    Definition Classes
    Status
  67. val INTERNAL_SERVER_ERROR: Int

    Definition Classes
    Status
  68. val LAST_MODIFIED: String

    Definition Classes
    HeaderNames
  69. val LENGTH_REQUIRED: Int

    Definition Classes
    Status
  70. val LOCATION: String

    Definition Classes
    HeaderNames
  71. val LOCKED: Int

    Definition Classes
    Status
  72. val MAX_FORWARDS: String

    Definition Classes
    HeaderNames
  73. val METHOD_NOT_ALLOWED: Int

    Definition Classes
    Status
  74. val MOVED_PERMANENTLY: Int

    Definition Classes
    Status
  75. val MULTIPLE_CHOICES: Int

    Definition Classes
    Status
  76. val MULTI_STATUS: Int

    Definition Classes
    Status
  77. val NON_AUTHORITATIVE_INFORMATION: Int

    Definition Classes
    Status
  78. val NOT_ACCEPTABLE: Int

    Definition Classes
    Status
  79. val NOT_FOUND: Int

    Definition Classes
    Status
  80. val NOT_IMPLEMENTED: Int

    Definition Classes
    Status
  81. val NOT_MODIFIED: Int

    Definition Classes
    Status
  82. val NO_CONTENT: Int

    Definition Classes
    Status
  83. val OK: Int

    Definition Classes
    Status
  84. val ORIGIN: String

    Definition Classes
    HeaderNames
  85. val PARTIAL_CONTENT: Int

    Definition Classes
    Status
  86. val PAYMENT_REQUIRED: Int

    Definition Classes
    Status
  87. val POST: String

    Definition Classes
    PlayRunners
  88. val PRAGMA: String

    Definition Classes
    HeaderNames
  89. val PRECONDITION_FAILED: Int

    Definition Classes
    Status
  90. val PROXY_AUTHENTICATE: String

    Definition Classes
    HeaderNames
  91. val PROXY_AUTHENTICATION_REQUIRED: Int

    Definition Classes
    Status
  92. val PROXY_AUTHORIZATION: String

    Definition Classes
    HeaderNames
  93. val PUT: String

    Definition Classes
    PlayRunners
  94. val RANGE: String

    Definition Classes
    HeaderNames
  95. val REFERER: String

    Definition Classes
    HeaderNames
  96. val REQUESTED_RANGE_NOT_SATISFIABLE: Int

    Definition Classes
    Status
  97. val REQUEST_ENTITY_TOO_LARGE: Int

    Definition Classes
    Status
  98. val REQUEST_TIMEOUT: Int

    Definition Classes
    Status
  99. val REQUEST_URI_TOO_LONG: Int

    Definition Classes
    Status
  100. val RESET_CONTENT: Int

    Definition Classes
    Status
  101. val RETRY_AFTER: String

    Definition Classes
    HeaderNames
  102. val SEE_OTHER: Int

    Definition Classes
    Status
  103. val SERVER: String

    Definition Classes
    HeaderNames
  104. val SERVICE_UNAVAILABLE: Int

    Definition Classes
    Status
  105. val SET_COOKIE: String

    Definition Classes
    HeaderNames
  106. val SET_COOKIE2: String

    Definition Classes
    HeaderNames
  107. val SWITCHING_PROTOCOLS: Int

    Definition Classes
    Status
  108. val TE: String

    Definition Classes
    HeaderNames
  109. val TEMPORARY_REDIRECT: Int

    Definition Classes
    Status
  110. val TOO_MANY_REQUEST: Int

    Definition Classes
    Status
  111. val TRAILER: String

    Definition Classes
    HeaderNames
  112. val TRANSFER_ENCODING: String

    Definition Classes
    HeaderNames
  113. val UNAUTHORIZED: Int

    Definition Classes
    Status
  114. val UNPROCESSABLE_ENTITY: Int

    Definition Classes
    Status
  115. val UNSUPPORTED_MEDIA_TYPE: Int

    Definition Classes
    Status
  116. val UPGRADE: String

    Definition Classes
    HeaderNames
  117. val USER_AGENT: String

    Definition Classes
    HeaderNames
  118. val USE_PROXY: Int

    Definition Classes
    Status
  119. val VARY: String

    Definition Classes
    HeaderNames
  120. val VIA: String

    Definition Classes
    HeaderNames
  121. val WARNING: String

    Definition Classes
    HeaderNames
  122. val WWW_AUTHENTICATE: String

    Definition Classes
    HeaderNames
  123. val X_FORWARDED_FOR: String

    Definition Classes
    HeaderNames
  124. val X_FORWARDED_HOST: String

    Definition Classes
    HeaderNames
  125. val X_FORWARDED_PORT: String

    Definition Classes
    HeaderNames
  126. val X_FORWARDED_PROTO: String

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

    Definition Classes
    Any
  128. 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
  129. 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
  130. 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
  131. def clone(): AnyRef

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

    Extracts the content as bytes.

    Extracts the content as bytes.

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

    Extracts the content as bytes.

    Extracts the content as bytes.

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

    Extracts the content as Json.

    Extracts the content as Json.

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

    Extracts the content as Json.

    Extracts the content as Json.

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

    Extracts the content as String.

    Extracts the content as String.

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

    Extracts the content as String.

    Extracts the content as String.

    Definition Classes
    ResultExtractors
  138. 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
  139. 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
  140. 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
  141. implicit def defaultAwaitTimeout: Timeout

    The default await timeout.

    The default await timeout. Override this to change it.

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

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

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

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  145. 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
  146. final def getClass(): Class[_]

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

    Definition Classes
    AnyRef → Any
  148. 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
  149. 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
  150. 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
  151. final def isInstanceOf[T0]: Boolean

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

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

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

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

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

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

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

    Definition Classes
    AnyRef
  159. 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
  160. 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
  161. 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
  162. 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
  163. 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
  164. 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
  165. 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
  166. 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
  167. 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
  168. 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
  169. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  170. 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
  171. def toString(): String

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

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

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

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

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

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

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

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

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

    Definition Classes
    Writeables
  181. 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
  182. 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 HttpProtocol

Inherited from Status

Inherited from HeaderNames

Inherited from PlayRunners

Inherited from AnyRef

Inherited from Any

Ungrouped