Quantcast
Channel: Service Bus forum
Viewing all articles
Browse latest Browse all 1916

Unit test BrokeredMessage

$
0
0

Hi!

I have troubles writing unit tests of methods that uses BrokeredMessage, since I do not know how to set the state of the message. For example, I have message.Complete() inside a method that I want to test, but it throws exceptions since the message is not in the correct state. Any ideas of how to fix this?

This is the exception I get: System.InvalidOperationException : Operation is not valid due to the current state of the object.

BR
Arthur


Viewing all articles
Browse latest Browse all 1916

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>