I am trying to use EasyMock with IntelliJ. How to go about it?
What do you need? It's like any java library. You add it to the classpath.
There is nothing specific to IntelliJ
Hi, are you considering support for Kotlin? Now, in my opinion base on our project, it's usable but with some tricky problems. One of the biggest problem is "inconsistent stack height" when mocking class with Kotlin specific constructs (like lambdas or default parameter values). Thanks for your answer.
@holubec-petr Sorry... I really missed your question. I am all in favour of supporting Kotlin. However, I don't know what the current problems are. Can you elaborate on the "inconsistent stack height"? What is it?
Will there be support for using default methods of interfaces. Right now if I try to create a partial mock and then call a method on that mock that calls a default interface method, it calls that method (doesn't automatically mock it like other abstract methods). If I try to add as a mock by using addMockedMethod, I get java.lang.IllegalArgumentException: Method not found (or private)
@mallorygiles Highly interesting. They won't be mocked by default since they are not abstract
But we should be able to mock them
Which flavor of addMockedMethod are you using?
So B b = partialMockBuilder(B.class)
.createMock(); this will work
But you are right, default methods are not searched for. That's a required enhancement
Can you file an issue?
Thanks for the workaround. I'll file the issue.
@mallorygiles I haven't seen any issue yet :-)
Sorry, I got side tracked. Submitted the easymock/easymock#203.
Hi, a while ago we updated easymock 3.5. We have custom implementations inheriting from the Capture class. Because the default constructor is deprecated now, I get warnings in eclipse and need to now how I have to change the code in order to remove the warnings. How can I call Easymock.newCapture for a custom capture class?
You can't. But this is interesting. I wasn't expecting someone to inherit this class. What are you doing on top of the original Capture?