Questions tagged [jmock]

For questions about using jMock. JMock is a helper framework for test-driven development and unit testing.

According to the jMock project website,

JMock is a library that supports test-driven development of Java code with mock objects.

Mock objects help you design and test the interactions between the objects in your programs.

The jMock library:

  • makes it quick and easy to define mock objects, so you don't break the rhythm of programming
  • lets you precisely specify the interactions between your objects, reducing the brittleness of your tests
  • works well with the autocompletion and refactoring features of your IDE
  • plugs into your favourite test framework
  • is easy to extend
257 questions
-1
votes
1 answer

JMock expecting void method to be invoked

I am using JMock to test the following method in a ProcessingTest class: public void handle(Process process) { processor.handleProcess(process); } I have mocked out the processor and process classes. For my test for this particular method, my…
dres
  • 499
  • 6
  • 18
-1
votes
1 answer

ByteBuffer mock allows all calls but I didn't set JMOCK to alow it

I have an issue with JMOCK 2.6 and JUINT4 when mocking ByteBuffer @RunWith(JUnit4.class) public class Test { @Rule public JUnitRuleMockery context = new JUnitRuleMockery() { { …
Amir Baron
  • 101
  • 6
1 2 3
17
18