Пример #1
0
        public async Task <bool> CanSendMessageEndToEnd()
        {
            cleanDatabase();

            var trigger = new TriggerMessage {
                Name = Guid.NewGuid().ToString()
            };

            await theSender
            .TrackActivity()
            .AlsoTrack(theReceiver)
            .WaitForMessageToBeReceivedAt <CascadedMessage>(theSender)
            .SendMessageAndWait(trigger);

            return(true);
        }
Пример #2
0
        public async Task <bool> CanSendMessageEndToEnd()
        {
            cleanDatabase();

            var trigger = new TriggerMessage {
                Name = Guid.NewGuid().ToString()
            };

            var waiter = theTracker.WaitFor <CascadedMessage>();

            await theSender.Messaging.Send(trigger);

            var env = await waiter;

            StoryTellerAssert.Fail(env == null, "No return message was detected!");

            var name = env.Message.As <CascadedMessage>().Name;

            StoryTellerAssert.Fail(name != trigger.Name, "The response did not match the request");

            return(true);
        }