Search Results for

    Show / Hide Table of Contents

    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

    Extension Methods

    ObjectExtensions.IsDefaultForType<T>(T)
    ObjectExtensions.AsOption<T>(T)
    Extensions.AsInstanceOf<T>(object)
    In this article
    • githubEdit this page
    • View Source
    Back to top
    Contribute
    • Project Chat
    • Discussion Forum
    • Source Code
    Support
    • Akka.NET Support Plans
    • Akka.NET Observability Tools
    • Akka.NET Training & Consulting
    Maintained By
    • Petabridge - The Akka.NET Company
    • Learn Akka.NET