protected override Task <IWaitResults> ConfigureWaiter(AkkaMessageLocalWaiter waiter) { return(Waiter.Expect <Message>(m => m.Id == _messageA.Id) .Or <Message>(m => m.Id == _messageB.Id) .Or <Message>(m => m.Id == _messageC.Id) .Create()); }
public void Given_waiter_subscribed_for_message_When_publishing_message() { _transport = new LocalAkkaEventBusTransport(Sys); _waiter = new AkkaMessageLocalWaiter(Sys, _transport, TimeSpan.FromSeconds(2)); _waiter.Expect <string>(m => m.Like("Msg")); results = _waiter.Start(TimeSpan.FromMilliseconds(50)); }
public void Configure() { _actorSystem = ActorSystem.Create("test"); _transport = new LocalAkkaEventBusTransport(_actorSystem); Waiter = new AkkaMessageLocalWaiter(_actorSystem, _transport, TimeSpan.FromSeconds(1)); _results = ConfigureWaiter(Waiter); }
public void Given_waiter_subscribed_for_one_of_two_messages() { _transport = new LocalAkkaEventBusTransport(Sys); _waiter = new AkkaMessageLocalWaiter(Sys, _transport, TimeSpan.FromSeconds(10)); _waiter.Expect <string>() .Or <bool?>(); _received = _waiter.Start(TimeSpan.FromSeconds(1)); }
protected override Task <IWaitResults> ConfigureWaiter(AkkaMessageLocalWaiter waiter) { _messageA = "testMsg"; _messageC = 'a'; return(waiter.Expect <string>() .And <char>() .Or <int>() .Create()); }
protected override Task <IWaitResults> ConfigureWaiter(AkkaMessageLocalWaiter waiter) { var task = Waiter.Expect <string>() .And <char>() .Create(); Publish(_messageA); Publish(_messageB); return(task); }
public void Given_waiter_subscribed_for_message_When_publishing_message() { var actorSystem = ActorSystem.Create("test"); var transport = new LocalAkkaEventBusTransport(actorSystem); _waiter = new AkkaMessageLocalWaiter(actorSystem, transport, TimeSpan.FromSeconds(10)); _waiter.Expect <string>(); _results = _waiter.Start(TimeSpan.FromSeconds(1)); _testmsg = "TestMsg"; transport.Publish(_testmsg); }
protected abstract Task <IWaitResults> ConfigureWaiter(AkkaMessageLocalWaiter waiter);