Hi,
I am trying to unit test my consumers.
I have created mocks of all my dependencies. The problem arises when I try to call this method..
public void Consume(IConsumeContext<LogEvent> msg)
{
}
I need to somehow create an instance of msg to pass into this method. At the moment I have this as a starting point...
// Arrange
var msg = new MassTransit.Context.ConsumeContext<LogEvent>(
<< What to put here >>,
LogEvent()
{
Message1 = "Test Message"
});
// Act
consumer.Consume(msg);
What I can't work out how to do is to create something that implements MassTransit.IReceiveContext to create my test message.
Is this possible to do ?
Thanks.