Registry / testing / org-apache-sling-testing-sling-mock-junit4

org-apache-sling-testing-sling-mock-junit4

JSON →
library4.0.6javamavenunverified

Mock implementation of selected Sling APIs for unit testing with JUnit4.

<dependency> <groupId>org.apache.sling</groupId> <artifactId>org.apache.sling.testing.sling-mock.junit4</artifactId> <version>4.0.6</version> </dependency>
INSTALL
IMPORT
SIG · ORG-APACHE-SLING-T
O
org-apache-sling-testing-sling-mock-junit4
testingjavav4.0.6
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.

SlingContext
org.apache.sling.testing.mock.sling.junit4.SlingContext

Unit test with Sling mock context.

import org.apache.sling.testing.mock.sling.junit4.SlingContext; import org.junit.Rule; import org.junit.Test; public class SlingMockTest { @Rule public SlingContext context = new SlingContext(); @Test public void testResource() { context.create().resource("/test"); assertNotNull(context.resourceResolver().getResource("/test")); } }
Debug
Known issues

No known issues recorded.

Upgrade
Version history
4.0.6latest on Maven
Audit
Dependencies

No dependency data recorded yet.

Agent activity
5 hits · last 30 days
node
4
Amazon
1
Resources
org-apache-sling-testing-sling-mock-junit4 — mvn dependency:get org-apache-sling-testing-sling-mock-junit4 · libregistry