Interface INoImplicitSender
Normally test classes has TestActor as implicit sender.
So when no sender is specified when sending messages, TestActor
is used.
When a a test class implements INoImplicitSender this behavior is removed and the normal
behavior is restored, i.e. NoSender is used as sender when no sender has been specified.
public class WithImplicitSender : TestKit
{
public void TheTestMethod()
{
...
someActor.Tell("message"); //TestActor is used as Sender
someActor.Tell("message", TestActor); //TestActor is used as Sender
}
}
public class WithNoImplicitSender : TestKit, INoImplicitSender
{
public void TheTestMethod()
{
...
someActor.Tell("message"); //ActorRefs.NoSender is used as Sender
}
}
Namespace: Akka.TestKit
Assembly: Akka.TestKit.dll
Syntax
public interface INoImplicitSender