public interface RouteTest extends RequestBuilding, WSTestRequestBuilding, RouteTestResultComponent, MarshallingTestUtils
| Modifier and Type | Interface and Description |
|---|---|
static class |
RouteTest.DefaultHostInfo |
static class |
RouteTest.DefaultHostInfo$ |
static class |
RouteTest.TildeArrow<A,B> |
static class |
RouteTest.TildeArrow$ |
static class |
RouteTest.TildeBangArrow<A,B> |
static class |
RouteTest.TildeBangArrow$ |
static class |
RouteTest.WithTransformation2 |
RequestBuilding.RequestBuilderTransformerPipelineSupport.WithTransformation<A>, TransformerPipelineSupport.WithTransformerConcatenation<A,B>RouteTestResultComponent.RouteTestResult| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
actorSystemNameFrom(java.lang.Class<?> clazz) |
HttpCharset |
charset() |
scala.Option<HttpCharset> |
charsetOption() |
<T> scala.Function1<RouteTestResultComponent.RouteTestResult,T> |
check(scala.Function0<T> body) |
scala.collection.immutable.Seq<HttpEntity.ChunkStreamPart> |
chunks() |
org.apache.pekko.stream.scaladsl.Source<HttpEntity.ChunkStreamPart,java.lang.Object> |
chunksStream() |
void |
cleanUp() |
java.lang.String |
closingExtension() |
ContentType |
contentType() |
org.apache.pekko.actor.ActorSystem |
createActorSystem()
Override to supply a custom ActorSystem
|
RouteTest.DefaultHostInfo$ |
DefaultHostInfo()
Accessor for nested Scala object
|
<T> T |
entityAs(Unmarshaller<HttpEntity,T> evidence$1,
scala.reflect.ClassTag<T> evidence$2,
scala.concurrent.duration.Duration timeout) |
scala.concurrent.ExecutionContextExecutor |
executor() |
void |
expectWebSocketUpgradeWithProtocol(scala.Function1<java.lang.String,scala.runtime.BoxedUnit> body)
Asserts that the received response is a WebSocket upgrade response and the extracts
the chosen subprotocol and passes it to the handler.
|
boolean |
handled() |
<T extends HttpHeader> |
header(scala.reflect.ClassTag<T> evidence$5) |
scala.Option<HttpHeader> |
header(java.lang.String name) |
scala.collection.immutable.Seq<HttpHeader> |
headers() |
boolean |
isWebSocketUpgrade() |
org.apache.pekko.stream.Materializer |
materializer() |
MediaType |
mediaType() |
HttpResponse |
rawResponse() |
Rejection |
rejection() |
scala.collection.immutable.Seq<Rejection> |
rejections() |
HttpResponse |
response() |
<T> T |
responseAs(Unmarshaller<HttpResponse,T> evidence$3,
scala.reflect.ClassTag<T> evidence$4,
scala.concurrent.duration.Duration timeout) |
HttpEntity |
responseEntity() |
java.lang.Object |
responseSafe() |
RouteTestResultComponent.RouteTestResult |
result() |
scala.Function1<RouteTestResultComponent.RouteTestResult,RouteTestResultComponent.RouteTestResult> |
runRoute()
A dummy that can be used as
~> runRoute to run the route but without blocking for the result. |
StatusCode |
status() |
org.apache.pekko.actor.ActorSystem |
system() |
com.typesafe.config.Config |
testConfig() |
java.lang.String |
testConfigSource() |
RouteTest.TildeArrow$ |
TildeArrow()
Accessor for nested Scala object
|
RouteTest.TildeBangArrow$ |
TildeBangArrow()
Accessor for nested Scala object
|
scala.collection.immutable.Seq<HttpHeader> |
trailer() |
addAttribute, addCredentials, addHeader, addHeader, addHeaders, Delete, Get, Head, header2AddHeader, logRequest, logRequest, mapHeaders, Options, Patch, Post, Put, removeHeader, removeHeader, removeHeader, removeHeaderslogValue, logValueWSfailTestmarshal, marshallingTimeout, marshalToResponse, marshalToResponseForRequestAccepting, unmarshal, unmarshalValueRouteTest.DefaultHostInfo$ DefaultHostInfo()
RouteTest.TildeArrow$ TildeArrow()
RouteTest.TildeBangArrow$ TildeBangArrow()
org.apache.pekko.actor.ActorSystem createActorSystem()
java.lang.String actorSystemNameFrom(java.lang.Class<?> clazz)
java.lang.String testConfigSource()
com.typesafe.config.Config testConfig()
testConfig in interface MarshallingTestUtilsorg.apache.pekko.actor.ActorSystem system()
scala.concurrent.ExecutionContextExecutor executor()
org.apache.pekko.stream.Materializer materializer()
void cleanUp()
RouteTestResultComponent.RouteTestResult result()
<T> scala.Function1<RouteTestResultComponent.RouteTestResult,T> check(scala.Function0<T> body)
java.lang.Object responseSafe()
boolean handled()
HttpResponse response()
HttpEntity responseEntity()
HttpResponse rawResponse()
scala.collection.immutable.Seq<HttpEntity.ChunkStreamPart> chunks()
org.apache.pekko.stream.scaladsl.Source<HttpEntity.ChunkStreamPart,java.lang.Object> chunksStream()
<T> T entityAs(Unmarshaller<HttpEntity,T> evidence$1, scala.reflect.ClassTag<T> evidence$2, scala.concurrent.duration.Duration timeout)
<T> T responseAs(Unmarshaller<HttpResponse,T> evidence$3, scala.reflect.ClassTag<T> evidence$4, scala.concurrent.duration.Duration timeout)
ContentType contentType()
MediaType mediaType()
scala.Option<HttpCharset> charsetOption()
HttpCharset charset()
scala.collection.immutable.Seq<HttpHeader> headers()
<T extends HttpHeader> scala.Option<T> header(scala.reflect.ClassTag<T> evidence$5)
scala.Option<HttpHeader> header(java.lang.String name)
StatusCode status()
java.lang.String closingExtension()
scala.collection.immutable.Seq<HttpHeader> trailer()
scala.collection.immutable.Seq<Rejection> rejections()
Rejection rejection()
boolean isWebSocketUpgrade()
void expectWebSocketUpgradeWithProtocol(scala.Function1<java.lang.String,scala.runtime.BoxedUnit> body)
body - (undocumented)scala.Function1<RouteTestResultComponent.RouteTestResult,RouteTestResultComponent.RouteTestResult> runRoute()
~> runRoute to run the route but without blocking for the result.
The result of the pipeline is the result that can later be checked with check. See the
"separate running route from checking" example from ScalatestRouteTestSpec.scala.