How to unit test class that reads xml file ?

Posted by Night Walker on Stack Overflow See other posts from Stack Overflow or by Night Walker
Published on 2010-06-13T07:21:48Z Indexed on 2010/06/13 7:22 UTC
Read the original article Hit count: 303

Filed under:
|
|

Hello all

I need to write a unit tests for a class that reads a xml file and parses it's content. How can I Mock the file reading ? Because all the content of the tests should be against read file .

I use nmock2 with nUnit.

Thanks

© Stack Overflow or respective owner

Related posts about .NET

Related posts about unit-testing