4 ms·
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
by MichaelMoser123 10y ago
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.