Boost logo

Boost Users :

Subject: Re: [Boost-users] Boost.Mock ?
From: Mateusz Łoskot (mateusz_at_[hidden])
Date: 2014-01-14 04:43:17


On 14 January 2014 05:52, Mathieu Champlon <m.champlon_at_[hidden]> wrote:
>
> 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

Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net