Confused on TDD wrappers/adapters -


I am new to TDD view and am trying to isolate my tests, I am roaming in circles.

I have an app that I am attempting to write which uses OpenXML, so it has a large scale object which depends on working with an external framework. I thought that there would be a good idea to keep wrappers around these items, so in the case of the changes I was separated from them. My problem is that to represent something like a cell, I am passing in my cover in a real cell (hence there is something in the constructor).

To test this cover, I have to go to the actual cell from the OpenXML framework. Okay, it is capable, but I wanted to pass the constructor in a shared string tab, so that it could store the string value (if it was shared) for easy retrieval. SharedStringTablePart has a safe patron, so that you can not just make one on a fly for testing.

Sooo, I make a cover for that, but how do I test this new cover? I can not go into a SharedStringTablePart through dependency injection because I can not build one

I have to talk to 3rd party interface at any point in my app architecture and I do not test that layer ?

Do I just make rapper and TDD is a part of them and simply assume that if I pass through a single request and expect the written wrapped item, then the same reactions Answer?

It is not that it does not matter at this level, but I am using C #

thanksgiving

< Div class = "post-text" itemprop = "text">

There is a problem with this integration code,

The above does not mean that you leave the unit testing around, just the integration Not for code.

The way you are preparing those wrappers, it is a coupling tightly emo for external objects which are just changing the problem / moving the code around.

Do not obtain external objects in the constructor and mapping there. Drag them out of all those things, instead of handing it over to the code, which is to mapping the outer responsibility from the external presentation to the internal representation.

In the same way, you will depend on the rest of your code. I have some code that is responsible for communicating with third party libraries, does not expose any type of code that you want to keep with the rest of the system. Also it is not hidden in other things, it either directly maps or calls them, which makes them maps.


Comments