java - tdd with non-trivial algorithms -
In these days I'm coding some data structures in Java (if not all) a lot The only simple interface (add, include, delete) present, but there are non-trivial algorithms under the hood.
How can I use TDD technology in this situation?
I think the problem is that the tdd (and general unit test) is about testing the interface and the implementation is not that right?
If you know any technology to handle this matter, please tell me this.
Thank you for your help.
You are right that TDD is about testing the interface, and not implementation. He said, why do you check the actual implementation? The point is that if you adequately test the interface, the implementation does not matter .
When you find a bug in the implementation, it means that it infringes the interface, exposing it to the outside world, you need to track it down where it infringes the interface is. This is where you write your test case.
Comments
Post a Comment