Bhavik Kothari created SLING-13063:
--------------------------------------
Summary: [Sling Models] Migrate SlingObject, Self, and legacy
Injector tests to JUnit 5
Key: SLING-13063
URL: https://issues.apache.org/jira/browse/SLING-13063
Project: Sling
Issue Type: Improvement
Components: Sling Models
Reporter: Bhavik Kothari
As part of the ongoing effort for Migrating tests to JUnit5 in Sling Models
Impl (following SLING-13052 and SLING-13062 the recent basic Injector
migrations), this task focuses on migrating the core "SlingObject" and "Self"
injector tests to JUnit 5 (Jupiter).
These tests handle the resolution of underlying Sling resources, requests, and
self-adaptations
The following test classes are being migrated:
- SlingObjectInjectorRequestTest
- SlingObjectInjectorResourceTest
- SlingObjectInjectorResourceResolverTest
- SelfInjectorTest
- ResourceResolverInjectorTest (Legacy regression test)
Changes:
- Replacing `MockitoJUnitRunner` with `@ExtendWith(MockitoExtension.class)`.
- Updating all imports to `org.junit.jupiter.api`.
- Applying `lenient()` strictness to shared setup method to preserve legacy
test behavior and prevent `UnnecessaryStubbingException` without altering the
original test logic
--
This message was sent by Atlassian Jira
(v8.20.10#820010)