public void Can_catch_error_when_consuming()
{
Client.GetResponse = (e) =>
{
return "{ 'messages': [ { 'id': 1, 'body':'{\"Text\":\"hello\"}', 'timeout': 600 } ] }";
};
Client.Queue<Stub>()
.Next()
.OnError(ex => ex.Message.Should().Be("woo!"))
.Consume((m, ctx) =>
{
throw new Exception("woo!");
});
}