Am 20.06.2013 11:26, schrieb Jacob Carlborg:
On 2013-06-20 00:13, Paulo Pinto wrote:

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.

I would only mock an external service that needs to be available online.
I don't mock third party code. That would be insane. There's no limit.
Should I mock the standard library?

No, but if your code calls something that ends up calling again other part of your code, you might need to mock it somehow.

Specially if it is a library that does some IO (network, disk) in the process and is full of static methods.

--
Paulo

Reply via email to