Interface RouteTest
- All Superinterfaces:
- MarshallingTestUtils,- RequestBuilding,- RouteTestResultComponent,- TransformerPipelineSupport,- WSTestRequestBuilding
- All Known Subinterfaces:
- ScalatestRouteTest,- Specs2RouteTest
public interface RouteTest
extends RequestBuilding, WSTestRequestBuilding, RouteTestResultComponent, MarshallingTestUtils
- 
Nested Class SummaryNested ClassesModifier and TypeInterfaceDescriptionstatic classstatic classstatic classstatic classstatic classstatic classstatic classNested classes/interfaces inherited from interface org.apache.pekko.http.scaladsl.client.RequestBuildingRequestBuilding.RequestBuilderNested classes/interfaces inherited from interface org.apache.pekko.http.scaladsl.testkit.RouteTestResultComponentRouteTestResultComponent.RouteTestResultNested classes/interfaces inherited from interface org.apache.pekko.http.scaladsl.client.TransformerPipelineSupportTransformerPipelineSupport.WithTransformation<A>, TransformerPipelineSupport.WithTransformerConcatenation<A,B> 
- 
Method SummaryModifier and TypeMethodDescriptionactorSystemNameFrom(Class<?> clazz) charset()scala.Option<HttpCharset><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,Object> voidcleanUp()org.apache.pekko.actor.ActorSystemOverride to supply a custom ActorSystemAccessor for nested Scala object<T> TentityAs(Unmarshaller<HttpEntity, T> evidence$1, scala.reflect.ClassTag<T> evidence$2, scala.concurrent.duration.Duration timeout) scala.concurrent.ExecutionContextExecutorexecutor()voidexpectWebSocketUpgradeWithProtocol(scala.Function1<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.booleanhandled()scala.Option<HttpHeader><T extends HttpHeader>
 scala.Option<T>header(scala.reflect.ClassTag<T> evidence$5) scala.collection.immutable.Seq<HttpHeader>headers()booleanorg.apache.pekko.stream.Materializerscala.collection.immutable.Seq<Rejection>response()<T> TresponseAs(Unmarshaller<HttpResponse, T> evidence$3, scala.reflect.ClassTag<T> evidence$4, scala.concurrent.duration.Duration timeout) result()runRoute()A dummy that can be used as~> runRouteto run the route but without blocking for the result.status()org.apache.pekko.actor.ActorSystemsystem()com.typesafe.config.ConfigAccessor for nested Scala objectAccessor for nested Scala objectscala.collection.immutable.Seq<HttpHeader>trailer()Methods inherited from interface org.apache.pekko.http.scaladsl.testkit.MarshallingTestUtilsmarshal, marshallingTimeout, marshalToResponse, marshalToResponseForRequestAccepting, unmarshal, unmarshalValueMethods inherited from interface org.apache.pekko.http.scaladsl.client.RequestBuildingaddAttribute, addCredentials, addHeader, addHeader, addHeaders, Delete, Get, Head, header2AddHeader, logRequest, logRequest, mapHeaders, Options, Patch, Post, Put, removeHeader, removeHeader, removeHeader, removeHeadersMethods inherited from interface org.apache.pekko.http.scaladsl.testkit.RouteTestResultComponentfailTestMethods inherited from interface org.apache.pekko.http.scaladsl.client.TransformerPipelineSupportlogValue, logValueMethods inherited from interface org.apache.pekko.http.scaladsl.testkit.WSTestRequestBuildingWS
- 
Method Details- 
DefaultHostInfoRouteTest.DefaultHostInfo$ DefaultHostInfo()Accessor for nested Scala object- Returns:
- (undocumented)
 
- 
TildeArrowRouteTest.TildeArrow$ TildeArrow()Accessor for nested Scala object- Returns:
- (undocumented)
 
- 
TildeBangArrowRouteTest.TildeBangArrow$ TildeBangArrow()Accessor for nested Scala object- Returns:
- (undocumented)
 
- 
createActorSystemorg.apache.pekko.actor.ActorSystem createActorSystem()Override to supply a custom ActorSystem
- 
actorSystemNameFrom
- 
testConfigSourceString testConfigSource()
- 
testConfigcom.typesafe.config.Config testConfig()- Specified by:
- testConfigin interface- MarshallingTestUtils
 
- 
systemorg.apache.pekko.actor.ActorSystem system()
- 
executorscala.concurrent.ExecutionContextExecutor executor()
- 
materializerorg.apache.pekko.stream.Materializer materializer()
- 
cleanUpvoid cleanUp()
- 
result
- 
check
- 
responseSafeObject responseSafe()
- 
handledboolean handled()
- 
responseHttpResponse response()
- 
responseEntityHttpEntity responseEntity()
- 
rawResponseHttpResponse rawResponse()
- 
chunksscala.collection.immutable.Seq<HttpEntity.ChunkStreamPart> chunks()
- 
chunksStreamorg.apache.pekko.stream.scaladsl.Source<HttpEntity.ChunkStreamPart,Object> chunksStream()
- 
entityAs<T> T entityAs(Unmarshaller<HttpEntity, T> evidence$1, scala.reflect.ClassTag<T> evidence$2, scala.concurrent.duration.Duration timeout) 
- 
responseAs<T> T responseAs(Unmarshaller<HttpResponse, T> evidence$3, scala.reflect.ClassTag<T> evidence$4, scala.concurrent.duration.Duration timeout) 
- 
contentTypeContentType contentType()
- 
mediaTypeMediaType mediaType()
- 
charsetOptionscala.Option<HttpCharset> charsetOption()
- 
charsetHttpCharset charset()
- 
headersscala.collection.immutable.Seq<HttpHeader> headers()
- 
header
- 
header
- 
statusStatusCode status()
- 
closingExtensionString closingExtension()
- 
trailerscala.collection.immutable.Seq<HttpHeader> trailer()
- 
rejectionsscala.collection.immutable.Seq<Rejection> rejections()
- 
rejectionRejection rejection()
- 
isWebSocketUpgradeboolean isWebSocketUpgrade()
- 
expectWebSocketUpgradeWithProtocolAsserts that the received response is a WebSocket upgrade response and the extracts the chosen subprotocol and passes it to the handler.- Parameters:
- body- (undocumented)
 
- 
runRoutescala.Function1<RouteTestResultComponent.RouteTestResult,RouteTestResultComponent.RouteTestResult> runRoute()A dummy that can be used as~> runRouteto 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.- Returns:
- (undocumented)
 
 
-