How do I create a FileSystemStream?
Background I am using System.IO.Abstractions to mock File.OpenRead(). File.OpenRead() returns a FileSystemStream (as opposed to System.IO‘s FileStream). Problem I need to give the mocked method a FileSystemStream object to return, and I’m having trouble creating one. The below attempt produces an error. Unit-test code: var stream = new MemoryStream(); // Mock System.IO.Abstractions’s FileSystem var mockFS […]