Any pre-rolled System.IO abstraction libraries out there for Unit Testing?
Posted
by
Binary Worrier
on Programmers
See other posts from Programmers
or by Binary Worrier
Published on 2012-08-28T12:50:25Z
Indexed on
2012/08/28
15:50 UTC
Read the original article
Hit count: 210
To test methods that use the file system we need to basically put System.IO behind a set of interfaces that we can then mock, I do this with a DiskIO class and interface.
As my DiskIO code gets larger (and the grumblings from the we're unconvinced about this TDD thing crowd here in work get louder), I went looking for a comprehensive open source library that already does this and found . . . nothing.
I may be looking in the wrong place or have approached this problem in completely the wrong way.
I can't be the only idiot in this position, do these libraries exist, if so where are they?
Any you've used and would recommend?
Thanks
P.S. I'm happy with my current approach i.e. starting with what we need, and adding only when the need arises. Unfortunately the we're unconvinced about this TDD thing crowd remain unconvinced, and think that I can't be right.
© Programmers or respective owner