It depends on how close your code is to nuts'n'bolts; for example, you could work instead Streamand pass the code MemoryStreamto code (and check the contents). You can simply write to the file system (in the tempo area), check the contents and then pop it out. If your code is slightly above the file system, you can write a mockable IFileSysteminterface using the high-level methods you need (e.g. WriteAllBytes/ WriteAllText). It would be painful to mock the streaming APIs.
( )... () IWebClient (, DownloadString ..); , - WebClient . , .