Registry / testing / jmock-junit4

jmock-junit4

JSON →
library2.13.1javamavenunverified

JMock library for mocking Java objects in JUnit 4 tests.

<dependency> <groupId>org.jmock</groupId> <artifactId>jmock-junit4</artifactId> <version>2.13.1</version> </dependency>
INSTALL
IMPORT
SIG · JMOCK-JUNIT4
J
jmock-junit4
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.

Expectations
org.jmock.Expectations

Creates a mock object and sets an expectation using JMock.

import org.jmock.Expectations; import org.jmock.Mockery; import org.junit.Test; public class MyTest { Mockery context = new Mockery(); @Test public void test() { final MyInterface mock = context.mock(MyInterface.class); context.checking(new Expectations() {{ oneOf(mock).doSomething(); }}); mock.doSomething(); } }
Debug
Known issues

No known issues recorded.

Upgrade
Version history
2.13.1latest on Maven
Audit
Dependencies

No dependency data recorded yet.

Agent activity
7 hits · last 30 days
node
6
Amazon
1
Resources
jmock-junit4 — mvn dependency:get jmock-junit4 · libregistry