Registry / testing / powermock-module-junit4-rule

powermock-module-junit4-rule

JSON →
library2.0.9javamavenunverified

PowerMock support module for JUnit 4.x rules, enabling mocking of static methods and constructors in tests.

<dependency> <groupId>org.powermock</groupId> <artifactId>powermock-module-junit4-rule</artifactId> <version>2.0.9</version> </dependency>
INSTALL
IMPORT
SIG · POWERMOCK-MODULE-J
P
powermock-module-junit4-rule
testingjavav2.0.9
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.

PowerMockRule
org.powermock.modules.junit4.rule.PowerMockRule

Minimal JUnit 4 test using PowerMockRule to enable PowerMock features.

import org.powermock.modules.junit4.rule.PowerMockRule; import org.junit.Rule; public class ExampleTest { @Rule public PowerMockRule rule = new PowerMockRule(); }
Debug
Known issues
breakingPowerMock is incompatible with newer JUnit 5 and may conflict with other mocking frameworks like Mockito 4+.
fix
Consider migrating to Mockito's inline mock maker or other modern alternatives.
affects: >=2.0.0
Upgrade
Version history
2.0.9latest on Maven
Audit
Dependencies

No dependency data recorded yet.

Agent activity
8 hits · last 30 days
node
8
Resources
powermock-module-junit4-rule — mvn dependency:get powermock-module-junit4-rule · libregistry