Re: Re: Single assert / Single mock rule in practice

Mateusz Łoskot <[email protected]> Wed, 15 Jan 2014 17:03:54 +0000
Newsgroups gmane.comp.programming.test-driven-development
Message-ID <CABUeae9usMaVkC39x92fUa50Amk0PvQSnvoN72DW6Js2e7NVfw@mail.gmail.com>
On 15 January 2014 03:26, Charlie Poole <[email protected]> wrote:

>
> Unit tests _are_ about implementation at a certain level, and about
> interface at another.
>
> The difference is that we are talking about the "interface" of a class,
> which may be buried deep in the application. So that interface is part of
> the implementation of the next level up. What might be considered an
> "internal" for one test is then part of the interface for another test.
>

Right, that has been clear to me, in theory.



> So unit tests (or, as I now prefer, micro-tests) are around
> implementation, but not around the implementation of the precise thing you
> are testing. Unit tests, after all, test that the intent of the programmer
> is satisfied and the intent of the programmer has a lot to do with
> internals.
>

Charlie, you've nailed exactly what I've misunderstood.
Thank you very much.

Best regards,
-- 
Mateusz  Łoskot, http://mateusz.loskot.net