Registry / testing / jmock
library2.13.1javamavenunverified

Mock object library for Java test-driven development.

<dependency> <groupId>org.jmock</groupId> <artifactId>jmock</artifactId> <version>2.13.1</version> </dependency>
INSTALL
IMPORT
SIG · JMOCK
J
jmock
testingjavav2.13.1
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Mockery
org.jmock.Mockery

Create and verify mock objects

import org.jmock.Mockery; import org.jmock.Expectations; Mockery context = new Mockery(); final MyInterface mock = context.mock(MyInterface.class); context.checking(new Expectations() {{ oneOf(mock).doSomething(); }});
Debug
Known issues
breakingJMock 2.x uses a different API than 1.x; migration requires significant code changes.
fix
Refer to JMock migration guide when upgrading from 1.x.
affects: >=2.0.0
Upgrade
Version history
2.13.1latest on Maven
Audit
Dependencies

No dependency data recorded yet.

Agent activity
6 hits · last 30 days
node
6
Resources
jmock — mvn dependency:get jmock · libregistry