Mocking (with EasyMock?) java calls

21 views
Skip to first unread message

vanallan

unread,
Nov 5, 2009, 8:00:56 AM11/5/09
to Clojure
Hi
Im trying to convert a couple of Java methods in a Java project to
Clojure. The Java methods have test methods that mocks other part of
the whole system with EasyMock. Is it possible to something similar in
Clojure? I want to call a Java function and get a predetermined value
from that function in return to test with. This is because the java
method is using a database that I don't reach, and I want to use the
correct method call right from the start. Any one got any experience
in this?

:)

Howard Lewis Ship

unread,
Nov 11, 2009, 6:55:13 PM11/11/09
to clo...@googlegroups.com
Try looking at this:

http://github.com/hlship/cascade/blob/master/src/main/clojure/cascade/mock.clj
> --~--~---------~--~----~------------~-------~--~----~
> You received this message because you are subscribed to the Google
> Groups "Clojure" group.
> To post to this group, send email to clo...@googlegroups.com
> Note that posts from new members are moderated - please be patient with your first post.
> To unsubscribe from this group, send email to
> clojure+u...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en
> -~----------~----~----~----~------~----~------~--~---
>
>



--
Howard M. Lewis Ship

Creator of Apache Tapestry

The source for Tapestry training, mentoring and support. Contact me to
learn how I can get you up and productive in Tapestry fast!

(971) 678-5210
http://howardlewisship.com

ronen

unread,
Nov 15, 2009, 1:36:22 PM11/15/09
to Clojure
Id recommend using mockito instead:

http://mockito.org/

On Nov 12, 1:55 am, Howard Lewis Ship <hls...@gmail.com> wrote:
> Try looking at this:
>
> http://github.com/hlship/cascade/blob/master/src/main/clojure/cascade...
Reply all
Reply to author
Forward
0 new messages