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));
 }
Beispiel #2
0
 protected override Task <IWaitResults> ConfigureWaiter(AkkaMessageLocalWaiter waiter)
 {
     return(waiter.Expect <Message>(m => m.Id == _messageA.Id)
            .Or <Message>(m => m.Id == _messageB.Id)
            .And <Message>(m => m.Id == _messageC.Id)
            .Create());
 }
 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));
 }
Beispiel #4
0
        protected override Task <IWaitResults> ConfigureWaiter(AkkaMessageLocalWaiter waiter)
        {
            _messageA = "testMsg";
            _messageC = 'a';

            return(waiter.Expect <string>()
                   .And <char>()
                   .Or <int>()
                   .Create());
        }
        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);
        }