Akka.Streams.Tests.Actor.RequestStrategySubscriber.Props C# (CSharp) Method

Props() public static method

public static Props ( IActorRef probe, IRequestStrategy strat ) : Props
probe IActorRef
strat IRequestStrategy
return Props
        public static Props Props(IActorRef probe, IRequestStrategy strat)
            => Akka.Actor.Props.Create(() => new RequestStrategySubscriber(probe, strat)).WithDispatcher("akka.test.stream-dispatcher");

Usage Example

 public void ActorSubscriberSpec_should_should_work_with_WatermarkRequestStrategy()
 {
     Source.From(Enumerable.Range(1, 17))
     .RunWith(Sink.ActorSubscriber <int>(RequestStrategySubscriber.Props(TestActor, new WatermarkRequestStrategy(highWatermark: 10))), Sys.Materializer());
     Enumerable.Range(1, 17).ForEach(n => ExpectMsg <OnNext>().Element.Should().Be(n));
     ExpectMsg <OnComplete>();
 }