public void TextMediaTypeFormatter_CanReadTextStream(string encoding)
{
var mediaTypeFormatter = new TextMediaTypeFormatter();
var expected = "this is my text £!";
HttpContent content = new StringContent(expected, Encoding.GetEncoding(encoding));
var formatterLogger = new Mock<IFormatterLogger>();
var result = mediaTypeFormatter.ReadFromStreamAsync(typeof(string), content.ReadAsStreamAsync().Result, content, formatterLogger.Object);
Assert.Equal(result.Result.ToString(), expected);
}