I have created an instance of a BrokeredMessage and want to test my code around it's deliverycount versus a queue's max delivery count. I don't want to standup a real queue to send and receive the message on, but the deliverycount property is not initialized until the message is delivered. How can I fake this?
I ended up just writing a helper function called GetDeliveryCount that accepted a brokeredmessage as a parameter. This returned message.DeliverCount. For my unit tests, I just mocked this to return whatever I wanted.