public void Can_keep_a_message_while_it_is_being_consumed()
{
var endpoint = string.Empty;
var touched = 0;
Client.GetResponse = (e) => "{ 'messages': [ { 'id': 1, 'body':'{\"Text\":\"hello\"}', 'timeout': 600 } ] }";
Client.PostResponse = (e, b) =>
{
touched++;
endpoint = e;
return "{ 'msg' : 'Touched' }";
};
Client.Queue<Stub>()
.Next()
.KeepTouching(milliseconds: 10)
.Consume((m, ctx) => Thread.Sleep(100));
touched.Should().BeGreaterThan(1);
}