trait RouteTest extends RequestBuilding with WSTestRequestBuilding with RouteTestResultComponent with MarshallingTestUtils
- Self Type
- RouteTest with TestFrameworkInterface
- Source
- RouteTest.scala
- Alphabetic
- By Inheritance
- RouteTest
- MarshallingTestUtils
- RouteTestResultComponent
- WSTestRequestBuilding
- RequestBuilding
- TransformerPipelineSupport
- AnyRef
- Any
- by WithTransformation
- by WithTransformation
- by any2stringadd
- by StringFormat
- by Ensuring
- by ArrowAssoc
- Hide All
- Show All
- Public
- Protected
Type Members
- class RequestBuilder extends AnyRef
- Definition Classes
- RequestBuilding
- implicit class WithTransformation[A] extends AnyRef
- Definition Classes
- TransformerPipelineSupport
- implicit class WithTransformerConcatenation[A, B] extends (A) => B
- Definition Classes
- TransformerPipelineSupport
- case class DefaultHostInfo(host: Host, securedConnection: Boolean) extends Product with Serializable
- type RequestTransformer = (HttpRequest) => HttpRequest
- Definition Classes
- RequestBuilding
- abstract class TildeArrow[A, B] extends AnyRef
- abstract class TildeBangArrow[A, B] extends AnyRef
- implicit class WithTransformation2 extends AnyRef
- class RouteTestResult extends AnyRef
A receptacle for the response or rejections created by a route.
A receptacle for the response or rejections created by a route.
- Definition Classes
- RouteTestResultComponent
Abstract Value Members
- abstract def failTest(msg: String): Nothing
- Definition Classes
- RouteTestResultComponent
Concrete Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- def +(other: String): String
- def ->[B](y: B): (RouteTest, B)
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- val Delete: (RouteTest.this)#RequestBuilder
- Definition Classes
- RequestBuilding
- val Get: (RouteTest.this)#RequestBuilder
- Definition Classes
- RequestBuilding
- val Head: (RouteTest.this)#RequestBuilder
- Definition Classes
- RequestBuilding
- val Options: (RouteTest.this)#RequestBuilder
- Definition Classes
- RequestBuilding
- val Patch: (RouteTest.this)#RequestBuilder
- Definition Classes
- RequestBuilding
- val Post: (RouteTest.this)#RequestBuilder
- Definition Classes
- RequestBuilding
- val Put: (RouteTest.this)#RequestBuilder
- Definition Classes
- RequestBuilding
- def WS(uri: Uri, clientSideHandler: Flow[Message, Message, Any], subprotocols: Seq[String] = Nil)(implicit materializer: Materializer): HttpRequest
- Definition Classes
- WSTestRequestBuilding
- def actorSystemNameFrom(clazz: Class[_]): String
- def addAttribute[T](key: AttributeKey[T], value: T): (RouteTest.this)#RequestTransformer
- Definition Classes
- RequestBuilding
- def addCredentials(credentials: HttpCredentials): (RouteTest.this)#RequestTransformer
- Definition Classes
- RequestBuilding
- def addHeader(headerName: String, headerValue: String): (RouteTest.this)#RequestTransformer
- Definition Classes
- RequestBuilding
- def addHeader(header: HttpHeader): (RouteTest.this)#RequestTransformer
- Definition Classes
- RequestBuilding
- def addHeaders(first: HttpHeader, more: HttpHeader*): (RouteTest.this)#RequestTransformer
- Definition Classes
- RequestBuilding
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def charset: HttpCharset
- def charsetOption: Option[HttpCharset]
- def check[T](body: => T): ((RouteTest.this)#RouteTestResult) => T
- def chunks: Seq[ChunkStreamPart]
- def chunksStream: Source[ChunkStreamPart, Any]
- def cleanUp(): Unit
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- def closingExtension: String
- def contentType: ContentType
- def createActorSystem(): ActorSystem
Override to supply a custom ActorSystem
Override to supply a custom ActorSystem
- Attributes
- protected
- def ensuring(cond: (RouteTest) => Boolean, msg: => Any): RouteTest
- def ensuring(cond: (RouteTest) => Boolean): RouteTest
- def ensuring(cond: Boolean, msg: => Any): RouteTest
- def ensuring(cond: Boolean): RouteTest
- def entityAs[T](implicit arg0: FromEntityUnmarshaller[T], arg1: ClassTag[T], timeout: Duration = 1.second): T
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- implicit def executor: ExecutionContextExecutor
- def expectWebSocketUpgradeWithProtocol(body: (String) => Unit): Unit
Asserts that the received response is a WebSocket upgrade response and the extracts the chosen subprotocol and passes it to the handler.
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def handled: Boolean
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def header(name: String): Option[HttpHeader]
- def header[T >: Null <: HttpHeader](implicit arg0: ClassTag[T]): Option[T]
- implicit def header2AddHeader(header: HttpHeader): (RouteTest.this)#RequestTransformer
- Definition Classes
- RequestBuilding
- def headers: Seq[HttpHeader]
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def isWebSocketUpgrade: Boolean
- def logRequest(logFun: (HttpRequest) => Unit): (HttpRequest) => HttpRequest
- Definition Classes
- RequestBuilding
- def logRequest(log: LoggingAdapter, level: LogLevel = Logging.DebugLevel): (HttpRequest) => HttpRequest
- Definition Classes
- RequestBuilding
- def logValue[T](logFun: (T) => Unit): (T) => T
- Definition Classes
- TransformerPipelineSupport
- def logValue[T](log: LoggingAdapter, level: LogLevel = Logging.DebugLevel): (T) => T
- Definition Classes
- TransformerPipelineSupport
- def mapHeaders(f: (Seq[HttpHeader]) => Seq[HttpHeader]): (RouteTest.this)#RequestTransformer
- Definition Classes
- RequestBuilding
- def marshal[T](value: T)(implicit arg0: ToEntityMarshaller[T], ec: ExecutionContext, mat: Materializer): Strict
- Definition Classes
- MarshallingTestUtils
- def marshalToResponse[T](value: T, request: HttpRequest = HttpRequest())(implicit arg0: ToResponseMarshaller[T], ec: ExecutionContext): HttpResponse
- Definition Classes
- MarshallingTestUtils
- def marshalToResponseForRequestAccepting[T](value: T, mediaRanges: MediaRange*)(implicit arg0: ToResponseMarshaller[T], ec: ExecutionContext): HttpResponse
- Definition Classes
- MarshallingTestUtils
- def marshallingTimeout: FiniteDuration
- Definition Classes
- MarshallingTestUtils
- implicit val materializer: Materializer
- def mediaType: MediaType
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- def rejection: Rejection
- def rejections: Seq[Rejection]
- def removeHeader(clazz: Class[_]): (RouteTest.this)#RequestTransformer
- Definition Classes
- RequestBuilding
- def removeHeader[T <: HttpHeader](implicit arg0: ClassTag[T]): (RouteTest.this)#RequestTransformer
- Definition Classes
- RequestBuilding
- def removeHeader(headerName: String): (RouteTest.this)#RequestTransformer
- Definition Classes
- RequestBuilding
- def removeHeaders(names: String*): (RouteTest.this)#RequestTransformer
- Definition Classes
- RequestBuilding
- def response: HttpResponse
- def responseAs[T](implicit arg0: FromResponseUnmarshaller[T], arg1: ClassTag[T], timeout: Duration = 1.second): T
- def responseEntity: HttpEntity
- def runRoute: ((RouteTest.this)#RouteTestResult) => (RouteTest.this)#RouteTestResult
A dummy that can be used as
~> runRoute
to run the route but without blocking for the result.A dummy that can be used as
~> runRoute
to run the route but without blocking for the result. The result of the pipeline is the result that can later be checked withcheck
. See the "separate running route from checking" example from ScalatestRouteTestSpec.scala. - def status: StatusCode
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- implicit val system: ActorSystem
- def testConfig: Config
- Definition Classes
- RouteTest → MarshallingTestUtils
- def testConfigSource: String
- def toString(): String
- Definition Classes
- AnyRef → Any
- def trailer: Seq[HttpHeader]
- def unmarshal[T](entity: HttpEntity)(implicit arg0: FromEntityUnmarshaller[T], ec: ExecutionContext, mat: Materializer): Try[T]
- Definition Classes
- MarshallingTestUtils
- def unmarshalValue[T](entity: HttpEntity)(implicit arg0: FromEntityUnmarshaller[T], ec: ExecutionContext, mat: Materializer): T
- Definition Classes
- MarshallingTestUtils
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- object DefaultHostInfo extends Serializable
- object TildeArrow
- object TildeBangArrow
Shadowed Implicit Value Members
- def ~>[B](f: (RouteTest) => B): B
- Implicit
- This member is added by an implicit conversion from RouteTest toclient.RequestBuilding.WithTransformation[RouteTest] performed by method WithTransformation in org.apache.pekko.http.scaladsl.client.TransformerPipelineSupport.
- Shadowing
- This implicitly inherited member is ambiguous. One or more implicitly inherited members have similar signatures, so calling this member may produce an ambiguous implicit conversion compiler error.
To access this member you can use a type ascription:(routeTest: client.RequestBuilding.WithTransformation[RouteTest]).~>(f)
- Definition Classes
- WithTransformation
- def ~>[B](f: (RouteTest) => B): B
- Implicit
- This member is added by an implicit conversion from RouteTest toclient.TransformerPipelineSupport.WithTransformation[RouteTest] performed by method WithTransformation in org.apache.pekko.http.scaladsl.client.TransformerPipelineSupport.
- Shadowing
- This implicitly inherited member is ambiguous. One or more implicitly inherited members have similar signatures, so calling this member may produce an ambiguous implicit conversion compiler error.
To access this member you can use a type ascription:(routeTest: client.TransformerPipelineSupport.WithTransformation[RouteTest]).~>(f)
- Definition Classes
- WithTransformation
Deprecated Value Members
- def formatted(fmtstr: String): String
- Implicit
- This member is added by an implicit conversion from RouteTest toStringFormat[RouteTest] performed by method StringFormat in scala.Predef.
- Definition Classes
- StringFormat
- Annotations
- @deprecated @inline()
- Deprecated
(Since version 2.12.16) Use
formatString.format(value)
instead ofvalue.formatted(formatString)
, or use thef""
string interpolator. In Java 15 and later,formatted
resolves to the new method in String which has reversed parameters.
- def →[B](y: B): (RouteTest, B)
- Implicit
- This member is added by an implicit conversion from RouteTest toArrowAssoc[RouteTest] performed by method ArrowAssoc in scala.Predef.
- Definition Classes
- ArrowAssoc
- Annotations
- @deprecated
- Deprecated
(Since version 2.13.0) Use
->
instead. If you still wish to display it as one character, consider using a font with programming ligatures such as Fira Code.