Код: Выделить всё
// Create a memory stream to simulate the downloaded content
var memoryStream = new MemoryStream();
var writer = new StreamWriter(memoryStream);
writer.WriteLine("Header1,Header2,Header3");
writer.Flush();
//memoryStream.Position = 0;
var t = BlobsModelFactory.BlobDownloadStreamingResult(memoryStream);
var val = Response.FromValue(t, Substitute.For());
var returnVal = val.GetRawResponse();
blobClient.DownloadToAsync(Arg.Any()).Returns(returnVal);
Подробнее здесь: https://stackoverflow.com/questions/794 ... substitute
Мобильная версия