On 14 January 2014 05:52, Mathieu Champlon
Does the motivation example from the introduction answer your questions ? http://mat007.users.sourceforge.net/boost_mock/boost_mock/motivation.html
I'll copy it here if you want to discuss it:
class view { public: virtual void display( int result ) = 0; };
class calculator { public: calculator( view& v );
void add( int a, int b ); // the result will be sent to the view 'v' };
If I was developing a mocking framework, I'd rely on some classic Unit Testing/Mocking examples to support the motivation, like those about logging or sending e-mail. Simply, I'd translate Roy Osherove's introductory examples: http://www.youtube.com/watch?v=fAb_OnooCsQ Those are so well known within testing community, they are almost idiomatic, hence best for selling a framework. Best regards, -- Mateusz Łoskot, http://mateusz.loskot.net