I am trying to use Moq and Nunit to test a method of this form: crc
public long computeCRC(string filepath)
{
long crc;
...open file at filepath compute crc...
return crc;
}
I don't want the file at filepath
to be on a drive (I might not have read/write access). I would like to fill a stream with the same content every time in the test code (because I know the correct CRC for that content), get a filepath for the stream and be able to hand that filepath to the method being tested.