I need to write a unit test for a method that takes a stream which comes from a text file. I would like to do do something like this:
Stream s = GenerateStre
Another solution:
public static MemoryStream GenerateStreamFromString(string value) { return new MemoryStream(Encoding.UTF8.GetBytes(value ?? "")); }