Exemple #1
0
 internal static void SetExpectation(MessageHandledExpectation expectation)
 {
     lock (SyncRoot)
     {
         Expectations.Add(expectation);
     }
 }
Exemple #2
0
 internal static void RemoveExpectation(MessageHandledExpectation expectation)
 {
     lock (SyncRoot)
     {
         Expectations.Remove(expectation);
     }
 }
Exemple #3
0
        protected async Task GivenSubscriberExpectsPublication()
        {
            SubscriberHandlesPublication = new MessageHandledExpectation <TestPublication>((content, ctx) =>
                                                                                           Publication.Equals(content) && ctx.Bus == Subscriber);

            TestPublicationHandler.SetExpectation(SubscriberHandlesPublication);

            // Wait briefly to ensure subscriptions propagate
            await Task.Delay(TimeSpan.FromMilliseconds(250));
        }