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 2018/08/20 09:54:29 UTC
[sling-org-apache-sling-testing-sling-mock-oak] branch master
updated: update unit tests for SLING-7839
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-oak.git
The following commit(s) were added to refs/heads/master by this push:
new 705b240 update unit tests for SLING-7839
705b240 is described below
commit 705b240d203d89a36f73133e6291cdc92cc53c37
Author: sseifert <ss...@pro-vision.de>
AuthorDate: Mon Aug 20 11:54:21 2018 +0200
update unit tests for SLING-7839
---
.../sling/oak/contentimport/ContentLoaderJsonTest.java | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
diff --git a/src/test/java/org/apache/sling/testing/mock/sling/oak/contentimport/ContentLoaderJsonTest.java b/src/test/java/org/apache/sling/testing/mock/sling/oak/contentimport/ContentLoaderJsonTest.java
index a1a5189..fdacb1a 100644
--- a/src/test/java/org/apache/sling/testing/mock/sling/oak/contentimport/ContentLoaderJsonTest.java
+++ b/src/test/java/org/apache/sling/testing/mock/sling/oak/contentimport/ContentLoaderJsonTest.java
@@ -18,9 +18,17 @@
*/
package org.apache.sling.testing.mock.sling.oak.contentimport;
+import static org.junit.Assert.assertNotNull;
+
+import org.apache.jackrabbit.JcrConstants;
+import org.apache.sling.api.resource.Resource;
+import org.apache.sling.api.resource.ResourceUtil;
+import org.apache.sling.api.resource.ValueMap;
import org.apache.sling.testing.mock.sling.ResourceResolverType;
import org.apache.sling.testing.mock.sling.loader.AbstractContentLoaderJsonTest;
+import org.junit.Test;
+@SuppressWarnings("null")
public class ContentLoaderJsonTest extends AbstractContentLoaderJsonTest {
@Override
@@ -28,4 +36,13 @@ public class ContentLoaderJsonTest extends AbstractContentLoaderJsonTest {
return ResourceResolverType.JCR_OAK;
}
+ @Test
+ public void testJcrUuid() {
+ Resource resource = context.resourceResolver().getResource(path + "/sample/en/jcr:content/par/image/file/jcr:content");
+ ValueMap props = ResourceUtil.getValueMap(resource);
+
+ // jcr:uuid is not imported from json with OAK repository - just check for not null
+ assertNotNull(props.get(JcrConstants.JCR_UUID));
+ }
+
}