Table of Contents

Class InternalTestActorRef

Namespace
Akka.TestKit.Internal
Assembly
Akka.TestKit.dll

INTERNAL This special ActorRef is exclusively for use during unit testing in a single-threaded environment. Therefore, it overrides the dispatcher to CallingThreadDispatcher and sets the receiveTimeout to None. Otherwise, it acts just like a normal ActorRef. You may retrieve a reference to the underlying actor to test internal logic. Note! Part of internal API. Breaking changes may occur without notice. Use at own risk.

public class InternalTestActorRef : LocalActorRef
Inheritance
InternalTestActorRef

Properties

UnderlyingActor

TBD

public object UnderlyingActor { get; }

Property Value

object

Exceptions

Akka.Actor.IllegalActorStateException

TBD

Methods

Create(ActorSystem, Props, IActorRef, string)

INTERNAL Note! Part of internal API. Breaking changes may occur without notice. Use at own risk.

public static InternalTestActorRef Create(ActorSystem system, Props props, IActorRef supervisor = null, string name = null)

Parameters

system ActorSystem

TBD

props Props

TBD

supervisor IActorRef

TBD

name string

TBD

Returns

InternalTestActorRef

TBD

Exceptions

Akka.Pattern.IllegalStateException

TBD

CreateUniqueName()

INTERNAL Note! Part of internal API. Breaking changes may occur without notice. Use at own risk.

public static string CreateUniqueName()

Returns

string

TBD

GetTestActorCell()

TBD

protected InternalTestActorRef.TestActorCell GetTestActorCell()

Returns

InternalTestActorRef.TestActorCell

TBD

NewActorCell(ActorSystemImpl, IInternalActorRef, Props, MessageDispatcher, IInternalActorRef)

TBD

protected override ActorCell NewActorCell(ActorSystemImpl system, IInternalActorRef self, Props props, MessageDispatcher dispatcher, IInternalActorRef supervisor)

Parameters

system ActorSystemImpl

TBD

self IInternalActorRef

TBD

props Props

TBD

dispatcher MessageDispatcher

TBD

supervisor IInternalActorRef

TBD

Returns

ActorCell

TBD

Receive(object, IActorRef)

Directly inject messages into actor receive behavior. Any exceptions thrown will be available to you, while still being able to use become/unbecome.

public void Receive(object message, IActorRef sender = null)

Parameters

message object

The message.

sender IActorRef

The sender.

ReceiveAsync(object, IActorRef)

public Task ReceiveAsync(object message, IActorRef sender = null)

Parameters

message object
sender IActorRef

Returns

Task

ToString()

TBD

public override string ToString()

Returns

string

TBD

Unwatch(IActorRef)

Deregisters this actor from being a death monitor of the provided ActorRef This means that this actor will not get a Terminated()-message when the provided actor is permanently terminated. Returns the same ActorRef that is provided to it, to allow for cleaner invocations.

public void Unwatch(IActorRef subject)

Parameters

subject IActorRef

The subject to unwatch.

Watch(IActorRef)

Registers this actor to be a death monitor of the provided ActorRef This means that this actor will get a Terminated()-message when the provided actor is permanently terminated. Returns the same ActorRef that is provided to it, to allow for cleaner invocations.

public void Watch(IActorRef subject)

Parameters

subject IActorRef

The subject to watch.