Packages

package scaladsl

Source
package.scala
Linear Supertypes
Content Hierarchy
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. scaladsl
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Type Members

  1. final class ActorTestKit extends AnyRef

    Testkit for asynchronous testing of typed actors, meant for mixing into the test class.

    Testkit for asynchronous testing of typed actors, meant for mixing into the test class.

    Provides a typed actor system started on creation, used for all test cases and shut down when shutdown is called.

    The actor system has a custom guardian that allows for spawning arbitrary actors using the spawn methods.

    Designed to work with any test framework, but framework glue code that calls shutdown after all tests has run needs to be provided by the user.

    For synchronous testing of a Behavior see BehaviorTestKit

  2. abstract class ActorTestKitBase extends AnyRef

    A base class for the ActorTestKit, making it possible to have testing framework (e.g.

    A base class for the ActorTestKit, making it possible to have testing framework (e.g. ScalaTest) manage the lifecycle of the testkit.

    An implementation for ScalaTest is ScalaTestWithActorTestKit.

    Another abstract class that is testing framework specific should extend this class and automatically shut down the testKit when the test completes or fails by implementing ActorTestKitBase#afterAll.

  3. trait BehaviorTestKit[T] extends AnyRef

    Used for synchronous testing akka.actor.typed.Behaviors.

    Used for synchronous testing akka.actor.typed.Behaviors. Stores all effects e.g. Spawning of children, watching and offers access to what effects have taken place.

    For asynchronous testing of Behaviors running see ActorTestKit

    Not for user extension. See BehaviorTestKit.apply factory methods

    Annotations
    @DoNotInherit() @ApiMayChange()
  4. trait LogCapturing extends BeforeAndAfterAll

    Mixin this trait to a ScalaTest test to make log lines appear only when the test failed.

    Mixin this trait to a ScalaTest test to make log lines appear only when the test failed.

    Requires Logback and configuration like the following the logback-test.xml:

    <appender name="CapturingAppender" class="akka.actor.testkit.typed.internal.CapturingAppender" />
    
    <logger name="akka.actor.testkit.typed.internal.CapturingAppenderDelegate" >
      <appender-ref ref="STDOUT"/>
    </logger>
    
    <root level="DEBUG">
        <appender-ref ref="CapturingAppender"/>
    </root>
  5. trait LoggingTestKit extends AnyRef

    Facilities for verifying logs.

    Facilities for verifying logs.

    Requires Logback.

    See the companion object for convenient factory methods.

    Not for user extension.

    Annotations
    @DoNotInherit()
  6. final class ManualTime extends AnyRef

    Not for user instantiation, see ManualTime#apply

  7. trait ReplyInbox[T] extends AnyRef

    Similar to an akka.actor.testkit.typed.scaladsl.TestInbox, but can only ever give access to a single message (a reply).

    Similar to an akka.actor.testkit.typed.scaladsl.TestInbox, but can only ever give access to a single message (a reply).

    Not intended for user creation: the akka.actor.testkit.typed.scaladsl.BehaviorTestKit will provide these to denote that at most a single reply is expected.

    Annotations
    @DoNotInherit() @ApiMayChange()
  8. abstract class ScalaTestWithActorTestKit extends ActorTestKitBase with TestSuite with Matchers with BeforeAndAfterAll with ScalaFutures with Eventually

    A ScalaTest base class for the ActorTestKit, making it possible to have ScalaTest manage the lifecycle of the testkit.

    A ScalaTest base class for the ActorTestKit, making it possible to have ScalaTest manage the lifecycle of the testkit. The testkit will be automatically shut down when the test completes or fails using ScalaTest's BeforeAndAfterAll trait. If a spec overrides afterAll it must call super.afterAll.

    Note that ScalaTest is not provided as a transitive dependency of the testkit module but must be added explicitly to your project to use this.

    By default config is loaded from application-test.conf if that exists, otherwise using default configuration from the reference.conf resources that ship with the Akka libraries. The application.conf of your project is not used in this case. A specific configuration can be passed as constructor parameter.

  9. class SerializationTestKit extends AnyRef

    Utilities to test serialization.

  10. trait StatusReplyInbox[T] extends AnyRef

    A akka.actor.testkit.typed.scaladsl.ReplyInbox which specially handles akka.pattern.StatusReply.

    A akka.actor.testkit.typed.scaladsl.ReplyInbox which specially handles akka.pattern.StatusReply.

    Note that there is no provided ability to expect a specific Throwable, as it's recommended to prefer a string error message or to enumerate failures with specific types.

    Not intended for user creation: the akka.actor.testkit.typed.scaladsl.BehaviorTestKit will provide these to denote that at most a single reply is expected.

    Annotations
    @DoNotInherit() @ApiMayChange()
  11. implicit final class TestDuration extends AnyVal

    Scala API.

    Scala API. Scale timeouts (durations) during tests with the configured 'akka.actor.testkit.typed.timefactor'. Implicit class providing dilated method.

    import scala.concurrent.duration._
    import akka.actor.testkit.typed.scaladsl._
    10.milliseconds.dilated

    Uses the scaling factor from the TestTimeFactor in the TestKitSettings (in implicit scope).

  12. trait TestInbox[T] extends AnyRef

    Utility for use as an ActorRef when *synchronously* testing akka.actor.typed.Behavior with akka.actor.testkit.typed.scaladsl.BehaviorTestKit.

    Utility for use as an ActorRef when *synchronously* testing akka.actor.typed.Behavior with akka.actor.testkit.typed.scaladsl.BehaviorTestKit.

    If you plan to use a real akka.actor.typed.ActorSystem then use akka.actor.testkit.typed.scaladsl.TestProbe for asynchronous testing.

    Use factory apply in companion to create instances

    Not for user extension

    Annotations
    @DoNotInherit() @ApiMayChange()
  13. trait TestProbe[M] extends RecipientRef[M]

    Create instances through the factories in the TestProbe companion.

    Create instances through the factories in the TestProbe companion.

    A test probe is essentially a queryable mailbox which can be used in place of an actor and the received messages can then be asserted

    Not for user extension

    Annotations
    @DoNotInherit()

Value Members

  1. object ActorTestKit
  2. object ActorTestKitBase
  3. object BehaviorTestKit
    Annotations
    @ApiMayChange()
  4. object Effects

    Factories for behavior effects for BehaviorTestKit, each effect has a suitable equals and can be used to compare actual effects to expected ones.

  5. object FishingOutcomes
  6. object LoggingTestKit

    Facilities for selectively matching expected events from logging.

    Facilities for selectively matching expected events from logging.

    Requires Logback.

  7. object ManualTime

    Manual time allows you to do async tests while controlling the scheduler of the system.

    Manual time allows you to do async tests while controlling the scheduler of the system.

    To use it you need to configure the ActorSystem/ActorTestKit with ManualTime.config and access the scheduler control through ManualTime.apply

  8. object TestInbox
    Annotations
    @ApiMayChange()
  9. object TestProbe

Inherited from AnyRef

Inherited from Any

Ungrouped