News for hackers. Stuff that matters.
Re:Mocks Aren't Stubs (2007) by MichaelMoser123 on Monday November 14, 2016 @09:33PM (#12955164)
Also most mocking libraries require that tested/mocked classes must be derived from an interface, when an interface is not required this adds overhead just for the purpose of testing, this is bad.

Correction: googletest/googlemock (in c++) can create mocks of non virtual classes, they use scripts to generate the mock code. Still you need a special test build to link with the mocked classes, in java/.net you dont have this problem because of reflection.

There are no comments on this comment yet.