3 ms·
I guess in the example given you could also validate behaviour by using a Spy Warehouse (a capturing stub). The theoretical distinction with Mocks is that they
by hyko 6y ago
I guess in the example given you could also validate behaviour by using a Spy Warehouse (a capturing stub).
The theoretical distinction with Mocks is that they contain their own assertions. The practical distinction (when using mocking frameworks) is often that they allow testing a SUT that depends on concrete classes, without subclassing them.