public void CanReadTheWholeFile() { var stream = new SeekableNetworkStream(Constants.TWENTY_MEG_FILE); byte[] source = new byte[stream.Length]; stream.Read(source, 0, (int)stream.Length); string tempFile = Path.GetTempFileName(); try { File.WriteAllBytes(tempFile, source); string checkSum = DownloadTests.Md5SumByProcess(tempFile); Assert.True(checkSum == Constants.TWENTY_CHECKSUM); } finally { File.Delete(tempFile); } }