You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by ss...@apache.org on 2022/09/01 12:58:40 UTC

[sling-org-apache-sling-testing-sling-mock] branch master updated: explicitly register sling model in unit test to fix problem when re-using test cases in sling-mock-oak

This is an automated email from the ASF dual-hosted git repository.

sseifert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-testing-sling-mock.git


The following commit(s) were added to refs/heads/master by this push:
     new 19a3f61  explicitly register sling model in unit test to fix problem when re-using test cases in sling-mock-oak
19a3f61 is described below

commit 19a3f618bb14d1c5371ce029d4e8932e79e80db6
Author: Stefan Seifert <st...@users.noreply.github.com>
AuthorDate: Thu Sep 1 14:58:30 2022 +0200

    explicitly register sling model in unit test to fix problem when re-using test cases in sling-mock-oak
---
 .../mock/sling/resource/AbstractSlingCrudResourceResolverTest.java       | 1 +
 1 file changed, 1 insertion(+)

diff --git a/core/src/test/java/org/apache/sling/testing/mock/sling/resource/AbstractSlingCrudResourceResolverTest.java b/core/src/test/java/org/apache/sling/testing/mock/sling/resource/AbstractSlingCrudResourceResolverTest.java
index 29d50d4..0b84181 100644
--- a/core/src/test/java/org/apache/sling/testing/mock/sling/resource/AbstractSlingCrudResourceResolverTest.java
+++ b/core/src/test/java/org/apache/sling/testing/mock/sling/resource/AbstractSlingCrudResourceResolverTest.java
@@ -343,6 +343,7 @@ public abstract class AbstractSlingCrudResourceResolverTest {
 
     @Test
     public void testResourceInsideAndOutsideModel() {
+        context.addModelsForClasses(ResourceModel.class);
         Resource resource = context.currentResource("/");
         assertNotNull(resource);
         ResourceModel model = resource.adaptTo(ResourceModel.class);