Just started with writing unit tests and I am now, blocked with this situation:

I have a method which has a FileStream object and I am trying to pass a "string" to it. 
So, I would like to convert my string to FileStream and I am doing this:

```
File.WriteAllText(string.Concat(Environment.ExpandEnvironmentVariables("%temp%"),   
 @"/test.txt"), testFileContent); //writes my string to a temp file!

new FileStream(string.Concat(Environment.ExpandEnvironmentVariables("%temp%"),  
    @"/test.txt"), FileMode.Open) //open that temp file and uses it as a fileStream!

```

close the file then!

But, I guess there must be some very simple alternative to convert a string to a fileStream.

Suggestions are welcome! [Note there are other answers to this question in stackoverflow but none seems to be a straight forward solution to that]

Thanks in advance!