Hello,
I'm writing unit tests for the various components in my application, some of which interface with a RabbitMQ broker.
I've managed to successfully implement reading from a mocked call to IModel.BasicConsume() and acknowledging with IModel.BasicAck() but am stuck on IModel.BasicPublish(), in particular mocking the ack/nack mechanism with IModel as I need to test my component in both those scenarios.
How does the ack/nack mechanism work with IModel.WaitForConfirms() and how would I go about sending an ack/nack when the publisher calls IModel.BasicPublish()?
I'm using NSubstitute as my mocking library but I imagine the solution is translatable across mocking frameworks.
Thanks,
Mark