org.apache.pekko.http.javadsl.testkit

Members list

Type members

Classlikes

class ActorSystemResource(name: String, additionalConfig: Config) extends ExternalResource

Attributes

Source
JUnitRouteTest.scala
Supertypes
trait TestRule
class Object
trait Matchable
class Any
final case class DefaultHostInfo(host: Host, securedConnection: Boolean)

Attributes

Source
DefaultHostInfo.scala
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
abstract class JUnitRouteTestBase extends RouteTest

A RouteTest that uses JUnit assertions. ActorSystem and Materializer are provided as an org.junit.rules.ExternalResource and their lifetime is automatically managed.

A RouteTest that uses JUnit assertions. ActorSystem and Materializer are provided as an org.junit.rules.ExternalResource and their lifetime is automatically managed.

Attributes

Source
JUnitRouteTest.scala
Supertypes
Known subtypes

A base class to create route tests for testing libraries. An implementation needs to provide code to provide and shutdown an pekko.actor.ActorSystem, pekko.stream.Materializer, and scala.concurrent.ExecutionContextExecutor.

A base class to create route tests for testing libraries. An implementation needs to provide code to provide and shutdown an pekko.actor.ActorSystem, pekko.stream.Materializer, and scala.concurrent.ExecutionContextExecutor.

See JUnitRouteTest for an example of a concrete implementation.

Attributes

Source
RouteTest.scala
Supertypes
Known subtypes
trait TestRoute

A wrapped route that has a run method to run a request through the underlying route to create a TestResponse.

A wrapped route that has a run method to run a request through the underlying route to create a TestResponse.

A TestRoute is created by deriving a test class from the concrete RouteTest implementation for your testing framework (like JUnitRouteTest for JUnit) and then using its testRoute method to wrap a route with testing support.

Attributes

Source
TestRoute.scala
Supertypes
class Object
trait Matchable
class Any
abstract class TestRouteResult(_result: Future[RouteResult], awaitAtMost: FiniteDuration)(implicit ec: ExecutionContext, materializer: Materializer)

A wrapper for route results.

A wrapper for route results.

To support the testkit API, a third-party testing library needs to implement this class and provide implementations for the abstract assertion methods.

Attributes

Source
TestRouteResult.scala
Supertypes
class Object
trait Matchable
class Any
class WSProbe(delegate: WSProbe)

A WSProbe is a probe that implements a Flow[Message, Message, Unit] for testing websocket code.

A WSProbe is a probe that implements a Flow[Message, Message, Unit] for testing websocket code.

Requesting elements is handled automatically.

Attributes

Companion
object
Source
WSProbe.scala
Supertypes
class Object
trait Matchable
class Any
object WSProbe

Attributes

Companion
class
Source
WSProbe.scala
Supertypes
class Object
trait Matchable
class Any
Self type
WSProbe.type

Attributes

Source
WSTestRequestBuilding.scala
Supertypes
class Object
trait Matchable
class Any
Known subtypes