Simplest mock objects DSL

Denis Kudriashov dionisiydk at gmail.com
Tue Sep 4 12:34:10 UTC 2007


Hi, all

I released new version of new mock objects framework BehaviorMockup (
http://www.squeaksource.com/BehaviorMockup or cincom public repository).

Just see very simplest syntax:

[:mockA :mockB |
mockA someMessage.
mockB someMessage2]
    should strictly satisfy:
[:mockB :mockA :mockC|
mockA someMessage willReturn: 'some result'.
mockB someMessage2 willReturn: mockC].

First block is tested behavior. Its args is required mock objects for this
behavior.
Second block is behavior specification. Its args is all mock objects which
are needed for modelling real objects behavior.
Args in first block must have names which are equal for second block args.
In debugger mock objects will have same names.

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


More information about the Squeak-dev mailing list