Exemple #1
0
        protected override Task <IWaitResult> ConfigureWaiter(LocalMessagesWaiter waiter)
        {
            _messageA = "testMsg";
            _messageC = new C();

            return(waiter.Expect <string>().And <B>().Or <C>().Create());
        }
 protected override Task <IWaitResult> ConfigureWaiter(LocalMessagesWaiter 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());
 }
Exemple #3
0
        public AkkaWaiter_message_test_filtered_message()
        {
            _transport = new LocalAkkaEventBusTransport(Sys);
            var waiter = new LocalMessagesWaiter(Sys, _transport, TimeSpan.FromSeconds(2));

            waiter.Expect <string>(m => m.Like("Msg"));
            _results = waiter.Start(TimeSpan.FromSeconds(10));
        }
Exemple #4
0
        //Given_waiter_subscribed_for_message_When_publishing_message()
        public AkkaWaiter_One_Message_Test()
        {
            var actorSystem = TestActorSystem.Create();
            var transport   = new LocalAkkaEventBusTransport(actorSystem);
            var waiter      = new LocalMessagesWaiter(actorSystem, transport, TimeSpan.FromSeconds(10));

            waiter.Expect <string>();

            _results = waiter.Start(TimeSpan.FromSeconds(10));
            _testmsg = "TestMsg";
            transport.Publish(_testmsg, MessageMetadata.Empty);
        }
 protected override Task <IWaitResult> ConfigureWaiter(LocalMessagesWaiter waiter)
 {
     return(waiter.Expect <string>().Or <A>().Create());
 }