Pls explain what mock objects is.
https://en.wikipedia.org/wiki/Mock_object
Welcome to the awesome world of testing. Mocking in OOP is basically override some methods of a class/interface to do things and return artificial results without using original implementation. Imagine you are testing some class (foo) that has some method with some dependency (bar) . Because you only need to test (foo) and not (bar ) you need to mock (bar) to basically return some synthetic results. How to achieve that is complex... you need to use dynamic programing (RTTI).
I'm using "mock pascal" (SF) and FpTest (graeme) I believe it is sufficient for my purpose. Still testing :)
Обсуждают сегодня