Пример #1
0
        public async Task BusNotifyTest()
        {
            var options       = new ServiceBusOptions();
            var events        = A.Fake <IEventService>();
            var requests      = A.Fake <IRequestService>();
            var validation    = A.Fake <IValidationService>();
            var authorization = A.Fake <IAuthorizationService>();
            var bus           = new ServiceBus(options, events, requests, validation, authorization);
            var user          = A.Fake <ClaimsPrincipal>();

            var @event = A.Fake <IEvent>();
            await bus.Notify(user, @event);

            A.CallTo(() => events.Notify(bus, user, @event)).MustHaveHappened();
        }