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, IInternalActorRef, IActorRef, ICanTell, IEquatable<IActorRef>, IComparable<IActorRef>, ISurrogated, IComparable, IActorRefScope
Properties
| Improve this Doc View SourceUnderlyingActor
TBD
Declaration
public object UnderlyingActor { get; }
Property Value
Type | Description |
---|---|
Object |
Exceptions
Type | Condition |
---|---|
IllegalActorStateException | TBD |
Methods
| Improve this Doc 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 |
Akka.Actor.IInternalActorRef | self | TBD |
Props | props | TBD |
MessageDispatcher | dispatcher | TBD |
Akka.Actor.IInternalActorRef | supervisor | TBD |
Returns
Type | Description |
---|---|
ActorCell | TBD |
Overrides
| Improve this Doc 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
| Improve this Doc 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. |