TDD is BS?
Jacob Carlborg
doob at me.com
Sun Jun 23 13:11:11 PDT 2013
On 2013-06-23 21:50, Paulo Pinto wrote:
> No, but if your code calls something that ends up calling again other
> part of your code, you might need to mock it somehow.
I'm using same approach there. If I'm testing method "a" and it also
calls method "b". I assume method "b" works and I don't mock it. Then I
make sure to have a test for method "b" as well. A given test only tests
one method.
> Specially if it is a library that does some IO (network, disk) in the
> process and is full of static methods.
Especially network IO is a good idea to mock.
--
/Jacob Carlborg
More information about the Digitalmars-d
mailing list