This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Mocking/Stubbing Class with Static Factory Method and Regular Methods

Ivan Krizsan
Ranch Hand
Posts: 2198
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Another question, again regarding testing using MockFor or StubFor:
If I want to mock/stub a class like Calendar that has a static factory method to create instances of the class and also regular methods, I don't know how to return the mock/stub from the factory method.
Here is my code so far:

Many thanks in advance!
I agree. Here's the link:
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic