I currently have code like:
var fieldBoundary = Properties.Resources.TestFieldBoundary;
httpClient.Setup(
x =>
x.GetAsync(It.Is<Uri>(url => url.AbsoluteUri == APIUrl.AbsoluteUri + <my url>)))
.Returns(
Task.FromResult(new HttpResponseMessage(HttpStatusCode.OK)
{
Content = new StringContent(Encoding.Default.GetString(fieldBoundary))
}));
The first time through, using this mock http client I get the response that I expect. However when I call the same URL with the same mock object a second time I get a successful response but the response is an empty string or zero length byte array. Ideas on how this could be Moq'd differently?