You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Stefan Seifert (Jira)" <ji...@apache.org> on 2026/01/20 13:48:00 UTC

[jira] [Resolved] (SLING-13063) [Sling Models] Migrate SlingObject, Self, and legacy Injector tests to JUnit 5

     [ https://issues.apache.org/jira/browse/SLING-13063?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Stefan Seifert resolved SLING-13063.
------------------------------------
    Fix Version/s: Models Implementation 2.0.2
         Assignee: Stefan Seifert
       Resolution: Fixed

https://github.com/apache/sling-org-apache-sling-models-impl/commit/e20a483d4c2b377f9eb7d8da9b91e4454d9fcf0d

thanks for the contribution

> [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
>            Assignee: Stefan Seifert
>            Priority: Major
>             Fix For: Models Implementation 2.0.2
>
>
> 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)