TDD is BS?

Paulo Pinto pjmlp at progtools.org
Wed Jun 19 15:13:03 PDT 2013


Am 19.06.2013 23:11, schrieb Jacob Carlborg:
> On 2013-06-19 19:52, Paulo Pinto wrote:
>
>> - applications done in native languages with third party libraries only
>
> When I write a test for my own code that uses third party code or
> services I assume that they work 100% and will never fail. That's
> because I'm testing MY code not the third party code. For services it's
> also a good idea to mock them.
>

The issue is not to test third party libraries, far from it.

The problem is that you cannot mock them, specially if you rely a lot on
non virtual methods or pure function calls. Or on framework code that
calls your code back, after certain events happened in the system.

To do that properly, you end up wrapping third party code into code that 
can be replaced for unit tests execution, thus making the test effort an 
herculean task.

Good luck convincing any project manager on the enterprise world that
wrapping third party code to ease unit testing is worthwhile.

--
Paulo


More information about the Digitalmars-d mailing list