Class RouteTest

  • All Implemented Interfaces:
    WSTestRequestBuilding
    Direct Known Subclasses:
    JUnitRouteTestBase

    public abstract class RouteTest
    extends AllDirectives
    implements WSTestRequestBuilding
    A base class to create route tests for testing libraries. An implementation needs to provide code to provide and shutdown an ActorSystem, Materializer, and ExecutionContextExecutor.

    See JUnitRouteTest for an example of a concrete implementation.

    • Constructor Detail

      • RouteTest

        public RouteTest()
    • Method Detail

      • awaitDuration

        protected scala.concurrent.duration.FiniteDuration awaitDuration()
      • defaultAwaitDuration

        protected scala.concurrent.duration.FiniteDuration defaultAwaitDuration()
      • executionContext

        public scala.concurrent.ExecutionContextExecutor executionContext()
      • materializer

        public abstract akka.stream.Materializer materializer()
      • system

        public abstract akka.actor.ActorSystem system()
      • testRoute

        public TestRoute testRoute​(Route first,
                                   Route... others)
        Wraps a list of route alternatives with testing support.
        Parameters:
        first - (undocumented)
        others - (undocumented)
        Returns:
        (undocumented)
      • testRoute

        public TestRoute testRoute​(Route first,
                                   scala.collection.immutable.Seq<Route> others)
        Wraps a list of route alternatives with testing support.
        Parameters:
        first - (undocumented)
        others - (undocumented)
        Returns:
        (undocumented)