play.api.test

Helpers

object Helpers extends Status with HeaderNames

Helper functions to run tests.

Source
Helpers.scala
Linear Supertypes
HeaderNames, Status, AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Helpers
  2. HeaderNames
  3. Status
  4. AnyRef
  5. 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 CONFLICT: Int

    Definition Classes
    Status
  27. val CONNECTION: String

    Definition Classes
    HeaderNames
  28. val CONTENT_DISPOSITION: String

    Definition Classes
    HeaderNames
  29. val CONTENT_ENCODING: String

    Definition Classes
    HeaderNames
  30. val CONTENT_LANGUAGE: String

    Definition Classes
    HeaderNames
  31. val CONTENT_LENGTH: String

    Definition Classes
    HeaderNames
  32. val CONTENT_LOCATION: String

    Definition Classes
    HeaderNames
  33. val CONTENT_MD5: String

    Definition Classes
    HeaderNames
  34. val CONTENT_RANGE: String

    Definition Classes
    HeaderNames
  35. val CONTENT_TRANSFER_ENCODING: String

    Definition Classes
    HeaderNames
  36. val CONTENT_TYPE: String

    Definition Classes
    HeaderNames
  37. val CONTINUE: Int

    Definition Classes
    Status
  38. val COOKIE: String

    Definition Classes
    HeaderNames
  39. val CREATED: Int

    Definition Classes
    Status
  40. val DATE: String

    Definition Classes
    HeaderNames
  41. val DELETE: String

  42. val ETAG: String

    Definition Classes
    HeaderNames
  43. val EXPECT: String

    Definition Classes
    HeaderNames
  44. val EXPECTATION_FAILED: Int

    Definition Classes
    Status
  45. val EXPIRES: String

    Definition Classes
    HeaderNames
  46. val FAILED_DEPENDENCY: Int

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

  48. val FORBIDDEN: Int

    Definition Classes
    Status
  49. val FOUND: Int

    Definition Classes
    Status
  50. val FROM: String

    Definition Classes
    HeaderNames
  51. val GATEWAY_TIMEOUT: Int

    Definition Classes
    Status
  52. val GET: String

  53. val GONE: Int

    Definition Classes
    Status
  54. val HEAD: String

  55. val HOST: String

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

  57. val HTTP_VERSION_NOT_SUPPORTED: Int

    Definition Classes
    Status
  58. val IF_MATCH: String

    Definition Classes
    HeaderNames
  59. val IF_MODIFIED_SINCE: String

    Definition Classes
    HeaderNames
  60. val IF_NONE_MATCH: String

    Definition Classes
    HeaderNames
  61. val IF_RANGE: String

    Definition Classes
    HeaderNames
  62. val IF_UNMODIFIED_SINCE: String

    Definition Classes
    HeaderNames
  63. val INSUFFICIENT_STORAGE: Int

    Definition Classes
    Status
  64. val INTERNAL_SERVER_ERROR: Int

    Definition Classes
    Status
  65. val LAST_MODIFIED: String

    Definition Classes
    HeaderNames
  66. val LENGTH_REQUIRED: Int

    Definition Classes
    Status
  67. val LOCATION: String

    Definition Classes
    HeaderNames
  68. val LOCKED: Int

    Definition Classes
    Status
  69. val MAX_FORWARDS: String

    Definition Classes
    HeaderNames
  70. val METHOD_NOT_ALLOWED: Int

    Definition Classes
    Status
  71. val MOVED_PERMANENTLY: Int

    Definition Classes
    Status
  72. val MULTIPLE_CHOICES: Int

    Definition Classes
    Status
  73. val MULTI_STATUS: Int

    Definition Classes
    Status
  74. val NON_AUTHORITATIVE_INFORMATION: Int

    Definition Classes
    Status
  75. val NOT_ACCEPTABLE: Int

    Definition Classes
    Status
  76. val NOT_FOUND: Int

    Definition Classes
    Status
  77. val NOT_IMPLEMENTED: Int

    Definition Classes
    Status
  78. val NOT_MODIFIED: Int

    Definition Classes
    Status
  79. val NO_CONTENT: Int

    Definition Classes
    Status
  80. val OK: Int

    Definition Classes
    Status
  81. val ORIGIN: String

    Definition Classes
    HeaderNames
  82. val PARTIAL_CONTENT: Int

    Definition Classes
    Status
  83. val PAYMENT_REQUIRED: Int

    Definition Classes
    Status
  84. val POST: String

  85. val PRAGMA: String

    Definition Classes
    HeaderNames
  86. val PRECONDITION_FAILED: Int

    Definition Classes
    Status
  87. val PROXY_AUTHENTICATE: String

    Definition Classes
    HeaderNames
  88. val PROXY_AUTHENTICATION_REQUIRED: Int

    Definition Classes
    Status
  89. val PROXY_AUTHORIZATION: String

    Definition Classes
    HeaderNames
  90. val PUT: String

  91. val RANGE: String

    Definition Classes
    HeaderNames
  92. val REFERER: String

    Definition Classes
    HeaderNames
  93. val REQUESTED_RANGE_NOT_SATISFIABLE: Int

    Definition Classes
    Status
  94. val REQUEST_ENTITY_TOO_LARGE: Int

    Definition Classes
    Status
  95. val REQUEST_TIMEOUT: Int

    Definition Classes
    Status
  96. val REQUEST_URI_TOO_LONG: Int

    Definition Classes
    Status
  97. val RESET_CONTENT: Int

    Definition Classes
    Status
  98. val RETRY_AFTER: String

    Definition Classes
    HeaderNames
  99. val SEE_OTHER: Int

    Definition Classes
    Status
  100. val SERVER: String

    Definition Classes
    HeaderNames
  101. val SERVICE_UNAVAILABLE: Int

    Definition Classes
    Status
  102. val SET_COOKIE: String

    Definition Classes
    HeaderNames
  103. val SET_COOKIE2: String

    Definition Classes
    HeaderNames
  104. val SWITCHING_PROTOCOLS: Int

    Definition Classes
    Status
  105. val TE: String

    Definition Classes
    HeaderNames
  106. val TEMPORARY_REDIRECT: Int

    Definition Classes
    Status
  107. val TOO_MANY_REQUEST: Int

    Definition Classes
    Status
  108. val TRAILER: String

    Definition Classes
    HeaderNames
  109. val TRANSFER_ENCODING: String

    Definition Classes
    HeaderNames
  110. val UNAUTHORIZED: Int

    Definition Classes
    Status
  111. val UNPROCESSABLE_ENTITY: Int

    Definition Classes
    Status
  112. val UNSUPPORTED_MEDIA_TYPE: Int

    Definition Classes
    Status
  113. val UPGRADE: String

    Definition Classes
    HeaderNames
  114. val USER_AGENT: String

    Definition Classes
    HeaderNames
  115. val USE_PROXY: Int

    Definition Classes
    Status
  116. val VARY: String

    Definition Classes
    HeaderNames
  117. val VIA: String

    Definition Classes
    HeaderNames
  118. val WARNING: String

    Definition Classes
    HeaderNames
  119. val WWW_AUTHENTICATE: String

    Definition Classes
    HeaderNames
  120. val X_FORWARDED_FOR: String

    Definition Classes
    HeaderNames
  121. val X_FORWARDED_HOST: String

    Definition Classes
    HeaderNames
  122. val X_FORWARDED_PORT: String

    Definition Classes
    HeaderNames
  123. val X_FORWARDED_PROTO: String

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

    Definition Classes
    Any
  125. def await[T](p: Future[T], timeout: Long, unit: TimeUnit): T

    Block until a Promise is redeemed with the specified timeout.

  126. def await[T](p: Future[T]): T

    Block until a Promise is redeemed.

  127. def charset(of: Result): Option[String]

    Extracts the Charset of this Result value.

  128. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws()
  129. def contentAsBytes(of: Result): Array[Byte]

    Extracts the content as bytes.

  130. def contentAsBytes(of: Content): Array[Byte]

    Extracts the content as bytes.

  131. def contentAsString(of: Result): String

    Extracts the content as String.

  132. def contentAsString(of: Content): String

    Extracts the content as String.

  133. def contentType(of: Result): Option[String]

    Extracts the Content-Type of this Result value.

  134. def contentType(of: Content): String

    Extracts the Content-Type of this Content value.

  135. def cookies(of: Result): Cookies

    Extracts the Cookies of this Result value.

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

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

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

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws()
  139. def flash(of: Result): Flash

    Extracts the Flash values of this Result value.

  140. final def getClass(): Class[_]

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

    Definition Classes
    AnyRef → Any
  142. def header(header: String, of: Result): Option[String]

    Extracts an Header value of this Result value.

  143. def headers(of: Result): Map[String, String]

    Extracts all Headers of this Result value.

  144. 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.

  145. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  146. def jRoute[T](app: Application, r: FakeRequest[T]): Option[Result]

  147. def jRoute(rh: RequestHeader, body: Array[Byte]): Option[Result]

  148. def jRoute(app: Application, rh: RequestHeader, body: Array[Byte]): Option[Result]

  149. def jRoute(app: Application, rh: RequestHeader): Option[Result]

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

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

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

    Definition Classes
    AnyRef
  153. def redirectLocation(of: Result): Option[String]

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

  154. def route[T](req: Request[T])(implicit w: Writeable[T]): Option[Result]

    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.

  155. def route[T](app: Application, req: Request[T])(implicit w: Writeable[T]): Option[Result]

    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.

  156. def route[T](rh: RequestHeader, body: T)(implicit w: Writeable[T]): Option[Result]

    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.

  157. def route[T](app: Application, rh: RequestHeader, body: T)(implicit w: Writeable[T]): Option[Result]

    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.

  158. 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.

  159. def running[T](testServer: TestServer)(block: ⇒ T): T

    Executes a block of code in a running server.

  160. def running[T](fakeApp: FakeApplication)(block: ⇒ T): T

    Executes a block of code in a running application.

  161. def session(of: Result): Session

    Extracts the Session of this Result value.

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

  162. def status(of: Result): Int

    Extracts the Status code of this Result value.

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

    Definition Classes
    AnyRef
  164. 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

  165. def toString(): String

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

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

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

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

  170. implicit def writeableOf_AnyContentAsFormUrlEncoded(implicit code: Codec): Writeable[AnyContentAsFormUrlEncoded]

  171. implicit def writeableOf_AnyContentAsJson(implicit codec: Codec): Writeable[AnyContentAsJson]

  172. implicit def writeableOf_AnyContentAsRaw: Writeable[AnyContentAsRaw]

  173. implicit def writeableOf_AnyContentAsText(implicit code: Codec): Writeable[AnyContentAsText]

  174. implicit def writeableOf_AnyContentAsXml(implicit codec: Codec): Writeable[AnyContentAsXml]

  175. 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()
  176. def wsUrl(url: String)(implicit port: Port): WSRequestHolder

    Construct a WS request for the given relative URL.

Deprecated Value Members

  1. def routeAndCall[T, ROUTER <: core.Router.Routes](router: Class[ROUTER], request: FakeRequest[T]): Option[Result]

    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.

    Annotations
    @deprecated
    Deprecated

    (Since version 2.1.0) Use route instead.

  2. def routeAndCall[T](request: FakeRequest[T]): Option[Result]

    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.

    Annotations
    @deprecated
    Deprecated

    (Since version 2.1.0) Use route instead.

Inherited from HeaderNames

Inherited from Status

Inherited from AnyRef

Inherited from Any

Ungrouped