Hi Panu,

Usually the first place to look for packages ("libraries") is
SqueakSource. To use is just go to http://www.squeaksource.com , hit
click in "Projects" and search for "Mock" in the text field. There are
some packages for using Mock Objects, after selecting a package you
may see some of them include documentation in the wiki page (see the
palette). You may comment the experience if you choose a package.
Best regards,

Hernán

2010/8/31 Panu Suominen <[email protected]>:
> Hi all,
>
> I am quite new to smalltalk and I am probably having "cultural"
> difficulties. I mostly work with Java.
> So it is possible that there is trivial answer for my question or my
> question is just wrong. But here
> it goes.
>
> I am implementing object that should make a call to some other object.
> I need to test that the
> caller works correctly based on the return value it receives. So
> basically the code and the test
> looks like this and I need to fill the XXXX part:
>
> Object>>doSomething
>    result:=innerObject makeACall.
>    "based on result do something"
>
> Test>>test
>    "get bogus object for testing from somewhere"
>    mockForTest := XXXX.
>    (Object new)
>        innerObject: mockForTest.
>        doSomething.
>    "check that something was done."
>
> I am used to resolve this kind of problems using mock objects. I
> tought it would be easy to implement
> in smalltalk too because it is dynamic language. However with my limited
> searches I did not found much usable code or examples how to do it.
> So, my question is: is there some easy way to resolve this problem or
> does it require
> a bigger library? If it does, is there a library already for that?
>
> --
> Panu
>
> _______________________________________________
> Pharo-users mailing list
> [email protected]
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-users
>

_______________________________________________
Pharo-users mailing list
[email protected]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-users

Reply via email to