New mock objects framework

Denis Kudriashov dionisiydk at gmail.com
Fri Sep 28 11:41:10 UTC 2007


Hi Robert,

thank you very much for your detailed explanations!
>

 Thank you for your interest! :)

Concerning this I would like to know if the following expression should pass
> or raise a WrongMessageSelector failure:
>
> [:mock | mock message1; message2]  should strictly satisfy:
> [:mock | mock message2 useArbitrarily. mock message1.].
>

This should pass. #useArbitrarily here specifies that #message2 can be
recieved "anywhere" (zero or several times). And it also means that the
message invocation does not depend on the kind of specification (strict or
lenient etc.).

The idea of #useArbitrarily here is to stress the fact, that though
invokation of #message2 is expected, it's not the essence of the spec.
But #message1
actually is. And we give some freedom for the sequense of sends in
implementation.

Best regards,
Denis
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20070928/fd866596/attachment.htm


More information about the Squeak-dev mailing list