public async Task Handle(SomeConcreteEventType busEvent)
 {
     MethodCallCounter.ForInstance(BusId).RecordCall <SomeConcreteEventTypeCompetingHandler>(ch => ch.Handle(busEvent));
 }
Ejemplo n.º 2
0
 public async Task Handle(SomeConcreteEventType busEvent)
 {
     MethodCallCounter.RecordCall <SomeConcreteEventTypeMulticastHandler>(ch => ch.Handle(busEvent));
 }
Ejemplo n.º 3
0
 public override async Task Handle(BarCommand busCommand)
 {
     MethodCallCounter.ForInstance(BusId).RecordCall <MultipleCommandHandler>(h => h.Handle(busCommand));
 }
Ejemplo n.º 4
0
 public async Task Handle(FooEvent busEvent)
 {
     MethodCallCounter.ForInstance(BusId).RecordCall <SecondFooEventHandler>(h => h.Handle(busEvent));
 }
Ejemplo n.º 5
0
 public async Task <FooResponse> Handle(FooRequest request)
 {
     MethodCallCounter.ForInstance(BusId).RecordCall <FirstFooRequestHandler>(h => h.Handle(request));
     return(new FooResponse(GetType().Name));
 }
Ejemplo n.º 6
0
 public override async Task OnCommandHandlerError <TBusCommand>(TBusCommand busCommand, BrokeredMessage brokeredMessage, Exception exception)
 {
     MethodCallCounter.RecordCall <SomeClassLevelInterceptor>(h => h.OnCommandHandlerError(busCommand, brokeredMessage, exception));
 }
Ejemplo n.º 7
0
        public async Task Handle(GoBangCommand busCommand)
        {
            MethodCallCounter.RecordCall <GoBangCommandHandler>(h => h.Handle(busCommand));

            throw new Exception("This handler is supposed to fail.");
        }
 public async Task TheMulticastEventBrokerShouldReceiveTheEvent()
 {
     MethodCallCounter.ReceivedCallsWithAnyArg <SomeConcreteEventTypeMulticastHandler>(mb => mb.Handle(null))
     .Count()
     .ShouldBe(1);
 }
        public async Task <SomeConcreteResponseType> Handle(SomeConcreteRequestType request)
        {
            MethodCallCounter.RecordCall <SomeConcreteRequestTypeMulticastHandler>(ch => ch.Handle(request));

            return(new SomeConcreteResponseType());
        }
Ejemplo n.º 10
0
        public async Task TheNonExplodingEventHandlerShouldHaveSeenTheMessageOnce()
        {
            var nonExplodingCalls = MethodCallCounter.ReceivedCallsWithAnyArg <DoesNotGoBangCompetingEventHandler>(h => h.Handle(_goBangEvent)).ToArray();

            nonExplodingCalls.Length.ShouldBe(1);
        }
Ejemplo n.º 11
0
 public async Task Handle(FooEvent busEvent)
 {
     MethodCallCounter.RecordCall <FirstFooEventHandler>(h => h.Handle(busEvent));
 }
Ejemplo n.º 12
0
 public async Task Handle(SomeCommand busCommand)
 {
     MethodCallCounter.ForInstance(BusId).RecordCall <SomeCommandHandler>(ch => ch.Handle(busCommand));
 }
Ejemplo n.º 13
0
 public override async Task OnCommandHandlerExecuting <TBusCommand>(TBusCommand busCommand, NimbusMessage nimbusMessage)
 {
     MethodCallCounter.ForInstance(BusId).RecordCall <SomeClassLevelInterceptor>(h => h.OnCommandHandlerExecuting(busCommand, nimbusMessage));
 }
Ejemplo n.º 14
0
 public async Task Handle(ThirdCommand busCommand)
 {
     MethodCallCounter.RecordCall <ThirdCommandHandler>(ch => ch.Handle(busCommand));
 }
 public override async Task OnCommandHandlerError <TBusCommand>(TBusCommand busCommand, NimbusMessage nimbusMessage, Exception exception)
 {
     MethodCallCounter.ForInstance(BusId).RecordCall <SomeBaseMethodLevelInterceptorForFoo>(h => h.OnCommandHandlerError(busCommand, nimbusMessage, exception));
 }
Ejemplo n.º 16
0
        public async Task Handle(FirstCommand busCommand)
        {
            MethodCallCounter.ForInstance(BusId).RecordCall <FirstCommandHandler>(ch => ch.Handle(busCommand));

            await Bus.Send(new SecondCommand());
        }
Ejemplo n.º 17
0
 public override async Task OnCommandHandlerSuccess <TBusCommand>(TBusCommand busCommand, BrokeredMessage brokeredMessage)
 {
     MethodCallCounter.RecordCall <SomeClassLevelInterceptor>(h => h.OnCommandHandlerSuccess(busCommand, brokeredMessage));
 }
Ejemplo n.º 18
0
 public async Task Handle(FooCommand busCommand)
 {
     MethodCallCounter.RecordCall <BrokerTestCommandHandler>(h => h.Handle(busCommand));
 }
Ejemplo n.º 19
0
        public async Task <SomeConcreteResponseType> Handle(SomeConcreteRequestType request)
        {
            MethodCallCounter.ForInstance(BusId).RecordCall <SomeConcreteRequestTypeHandler>(ch => ch.Handle(request));

            return(new SomeConcreteResponseType());
        }
Ejemplo n.º 20
0
 public void Dispose()
 {
     MethodCallCounter.RecordCall <BrokerTestCommandHandler>(h => h.Dispose());
 }
Ejemplo n.º 21
0
 public async Task Handle(AuditEvent busEvent)
 {
     MethodCallCounter.RecordCall <AuditEventHandler>(h => h.Handle(busEvent));
     TestHarnessLoggerFactory.Create().Debug("Received audit message {@AuditMessage}", busEvent);
 }
 public override async Task OnCommandHandlerExecuting<TBusCommand>(TBusCommand busCommand, NimbusMessage nimbusMessage)
 {
     MethodCallCounter.RecordCall<SomeMethodLevelInterceptorForBar>(h => h.OnCommandHandlerExecuting(busCommand, nimbusMessage));
 }
Ejemplo n.º 23
0
 public async Task Handle(GoBangEvent busEvent)
 {
     MethodCallCounter.ForInstance(BusId).RecordCall <DoesNotGoBangCompetingEventHandler>(h => h.Handle(busEvent));
 }
Ejemplo n.º 24
0
 public async Task Handle(SomeEventWeOnlyHandleViaCompetition busEvent)
 {
     MethodCallCounter.ForInstance(BusId).RecordCall <SomeCompetingEventHandler>(h => h.Handle(busEvent));
 }
Ejemplo n.º 25
0
 public async Task Handle(SecondCommand busCommand)
 {
     MethodCallCounter.RecordCall <SecondCommandHandler>(ch => ch.Handle(busCommand));
     await Bus.Send(new ThirdCommand());
 }
Ejemplo n.º 26
0
 public async Task <FooResponse> Handle(FooRequest request)
 {
     MethodCallCounter.RecordCall <FooRequestHandler>(h => h.Handle(request));
     return(new FooResponse());
 }
Ejemplo n.º 27
0
 public async Task Handle(SomeEventWeHandleViaMulticastAndCompetition busEvent)
 {
     MethodCallCounter.ForInstance(BusId).RecordCall <SomeMulticastEventHandler>(h => h.Handle(busEvent));
 }
 public override async Task OnCommandHandlerSuccess <TBusCommand>(TBusCommand busCommand, NimbusMessage nimbusMessage)
 {
     MethodCallCounter.ForInstance(BusId).RecordCall <SomeBaseMethodLevelInterceptorForFoo>(h => h.OnCommandHandlerSuccess(busCommand, nimbusMessage));
 }
 public async Task TheCompetingEventBrokerShouldReceiveTheEvent()
 {
     MethodCallCounter.ReceivedCallsWithAnyArg <SomeCompetingEventHandler>(mb => mb.Handle((SomeEventWeOnlyHandleViaCompetition)null))
     .Count()
     .ShouldBe(1);
 }
Ejemplo n.º 30
0
 public async Task Handle(SomeEventAboutAParticularThing busEvent)
 {
     MethodCallCounter.ForInstance(BusId).RecordCall <HandlerWithNoFilter>(h => h.Handle(busEvent));
 }