public void Run() { var args = new ExceptionReceivedEventArgs(new Exception(), Guid.NewGuid().ToString()); var queue = Substitute.For<IBusQueueReciever>(); queue.RegisterForEvents(Arg.Any<Func<BrokeredMessage, Task>>(), Arg.Any<OnMessageOptions>()); var handler = Substitute.For<IBusEventHandler<object>>(); var events = new BusEvents<object>(queue, handler); events.Run(); queue.Received().RegisterForEvents(Arg.Any<Func<BrokeredMessage, Task>>(), Arg.Any<OnMessageOptions>()); }
public void Run() { var args = new ExceptionReceivedEventArgs(new Exception(), Guid.NewGuid().ToString()); var queue = Substitute.For <IBusMessageReciever>(); queue.RegisterForEvents(Arg.Any <Func <BrokeredMessage, Task> >(), Arg.Any <OnMessageOptions>()); var handler = Substitute.For <IBusEventHandler <object> >(); var events = new BusEvents <object>(queue, handler); events.Run(); queue.Received().RegisterForEvents(Arg.Any <Func <BrokeredMessage, Task> >(), Arg.Any <OnMessageOptions>()); }
public void Run() { var args = new ExceptionReceivedEventArgs(new Exception(), Guid.NewGuid().ToString(), Guid.NewGuid().ToString(), Guid.NewGuid().ToString(), Guid.NewGuid().ToString()); var queue = Substitute.For <IBusReciever>(); queue.OnMessage(Arg.Any <Func <Message, CancellationToken, Task> >(), Arg.Any <MessageHandlerOptions>()); var handler = Substitute.For <IBusEventHandler <object> >(); var events = new BusEvents <object>(queue, handler); events.Run(); queue.Received().OnMessage(Arg.Any <Func <Message, CancellationToken, Task> >(), Arg.Any <MessageHandlerOptions>()); }