10

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?

Cristian
  • 42,563
  • 25
  • 88
  • 99

1 Answers1

7

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?

Sean Corfield
  • 6,297
  • 22
  • 31