I'm exploring clojure.contrib.mock
. I think I learned how to mock Clojure functions, but I don't see anything about mocking Java objects.
Is there a Clojure library to help me create Java mock objects or will I have to bring in libraries like EasyMock?
Depending on the Java objects you're trying to mock, you may find proxy
and/or reify
useful since they let you create Java-compatible objects in Clojure. Can you provide a more concrete example of what you're trying to do?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With