Top "Easymock" questions

Easymock is a mocking framework for Java.

What is the Mockito equivalent of expect().andReturn().times()

I've been experimenting the Mockito equivalent of the EasyMock.expect(someMethod()).andReturn(someMockObject).times(n); but I can't figure it …

java junit mockito easymock
How do I write a unit test to verify that a function sorts its result?

I have a data source from which I can request a list of people that live in a (any) country, …

java unit-testing junit easymock
EasyMock: test that method in mock isn't called

As per title, just wondering if there is a mechanism with easymock to test if a method wasn't called during …

easymock
EasyMock: Mock out a constructor call in java

I have a looked at similar questions on this board, but none of them answer my question. This sound strange, …

java mocking easymock constructor-injection
Can I mock a super class method call?

Sometimes, you want to test a class method and you want to do an expectation on a call of a …

java tdd mocking easymock jmock
Is there a way to partially mock an object using EasyMock?

E.g. let's say I have this class: public class Foo Implements Fooable { public void a() { // does some stuff bar = …

java testing mocking easymock
EasyMock: Get real parameter value for EasyMock.anyObject()?

In my unit tests I'm using EasyMock for creating mock objects. In my test code I have something like this …

java unit-testing easymock
Using easymock, repeated void method call

I am new to easymock. I am trying to mock a service where one of the methods is a void …

java junit easymock
java.lang.IllegalStateException: incompatible return value type

I am using EasyMock to create mock classes in test cases. expect(entity.getType()).andReturn("string"); Type belongs to the …

java unit-testing jakarta-ee easymock
Easymock isA vs anyObject

What is the difference between EasyMock.isA(String.class) and EasyMock.anyObject(String.class) (Or any other class supplied) In …

easymock