Class InternalTestActorRef
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.
Inheritance
Inherited Members
Namespace: Akka.TestKit.Internal
Assembly: Akka.TestKit.dll
Syntax
public class InternalTestActorRef : LocalActorRef, IActorRef, ICanTell, IEquatable<IActorRef>, IComparable<IActorRef>, ISurrogated, IComparable
Properties
| Edit this page View SourceUnderlyingActor
TBD
Declaration
public object UnderlyingActor { get; }
Property Value
| Type | Description |
|---|---|
| object |
Exceptions
| Type | Condition |
|---|---|
| IllegalActorStateException | TBD |
Methods
| Edit this page View SourceCreate(ActorSystem, Props, IActorRef?, string?)
INTERNAL
Declaration
public static InternalTestActorRef Create(ActorSystem system, Props props, IActorRef? supervisor = null, string? name = null)
Parameters
| Type | Name | Description |
|---|---|---|
| ActorSystem | system | TBD |
| Props | props | TBD |
| IActorRef | supervisor | TBD |
| string | name | TBD |
Returns
| Type | Description |
|---|---|
| InternalTestActorRef | TBD |
Exceptions
| Type | Condition |
|---|---|
| IllegalStateException | TBD |
CreateUniqueName()
INTERNAL
Declaration
public static string CreateUniqueName()
Returns
| Type | Description |
|---|---|
| string | TBD |
GetTestActorCell()
TBD
Declaration
protected InternalTestActorRef.TestActorCell GetTestActorCell()
Returns
| Type | Description |
|---|---|
| InternalTestActorRef.TestActorCell | TBD |
NewActorCell(ActorSystemImpl, IInternalActorRef, Props, MessageDispatcher, IInternalActorRef)
TBD
Declaration
protected override ActorCell NewActorCell(ActorSystemImpl system, IInternalActorRef self, Props props, MessageDispatcher dispatcher, IInternalActorRef supervisor)
Parameters
| Type | Name | Description |
|---|---|---|
| ActorSystemImpl | system | TBD |
| IInternalActorRef | self | TBD |
| Props | props | TBD |
| MessageDispatcher | dispatcher | TBD |
| IInternalActorRef | supervisor | TBD |
Returns
| Type | Description |
|---|---|
| ActorCell | TBD |
Overrides
| Edit this page View SourceReceive(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.
Declaration
public void Receive(object message, IActorRef? sender = null)
Parameters
| Type | Name | Description |
|---|---|---|
| object | message | The message. |
| IActorRef | sender | The sender. |
ReceiveAsync(object, IActorRef?)
Declaration
public Task ReceiveAsync(object message, IActorRef? sender = null)
Parameters
| Type | Name | Description |
|---|---|---|
| object | message | |
| IActorRef | sender |
Returns
| Type | Description |
|---|---|
| Task |
ToString()
TBD
Declaration
public override string ToString()
Returns
| Type | Description |
|---|---|
| string | TBD |
Overrides
| Edit this page View SourceUnwatch(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.
Declaration
public void Unwatch(IActorRef subject)
Parameters
| Type | Name | Description |
|---|---|---|
| IActorRef | subject | 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.
Declaration
public void Watch(IActorRef subject)
Parameters
| Type | Name | Description |
|---|---|---|
| IActorRef | subject | The subject to watch. |
Edit this page