Hi, I'm new to the TDD scene and trying to isolate my tests is having me go around in circles.
I have an app I am trying to write that uses OpenXML so it has a mass of objects that it depends on to work from an external framework. I thought it would be a good idea to have wrappers around these objects so I was isolated from them in case of changes etc. My problem is that to represent something like a Cell, I am passing in a real Cell into my wrapper (so it has something to wrap) in the constructor.
To test this wrapper, I have to pass in a real Cell from the OpenXML framework. Ok that's do-able but I also wanted to pass in a SharedStringTablePart to the constructor so it could store the string value (if it was a sharedstring) for easy retrieval. SharedStringTablePart has a protected constructor so you can't just create one on the fly in a test to test with.
Sooo, I create a wrapper for that too but how do I test this new wrapper? I can't pass in a SharedStringTablePart via dependency injection as I can't construct one.
I have to talk to the 3rd party interface at some point in my app architecture don't I and test that layer?
Do I just create wrappers and not bother with the TDD part of them and just assume they will work if I pass through the same requests and respond with the same responses the actual wrapped object would expect/do?
Not that it makes any difference at this level but I am using c#
thanks Nev