Tell me more ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

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.

share|improve this question
1  
Too localised? So no one else is doing TDD for .net? Grand, too localised it must be so. – Binary Worrier Aug 28 '12 at 13:32

2 Answers

One things that comes to mind: System.IO.Abstractions.
Never used it though.

share|improve this answer
It appears my google-fu has let me down, thanks mate. – Binary Worrier Aug 28 '12 at 13:09

I've been using https://github.com/asd-and-Rizzo/UnitWrappers which worked well enough. You may need to refactor a good bit of your code since the constructor/initializer usage doesn't support some usage patterns.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.