We are creating a framework that will be used by other developers, and now we use many TDD methods. We have interfaces everywhere and have well-written unit tests that mock interfaces.
However, we have now reached the point where some of the properties / methods of the input classes must be internal and not visible to our infrastructure users (for example, the object id). The problem is that we cannot put these fields / methods on the interface, because the interface does not describe accessibility.
We could:
- Still use the interfaces and increase the speed in the first line of the method, but this seems to have exceeded the goals of the interfaces.
- Using classes as input parameters is a violation of the TDD rule that everything should be an interface
- Provide a different layer that does some translation between public interfaces and internal interfaces.
Is there an existing model / approach to solve this problem? What do TDD people say?
source
share