You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by da...@apache.org on 2018/05/03 13:59:42 UTC

[sling-org-apache-sling-feature-io] branch master updated: Fix JSON repoinit reader test

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

davidb pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-feature-io.git


The following commit(s) were added to refs/heads/master by this push:
     new 7e6ccc5  Fix JSON repoinit reader test
7e6ccc5 is described below

commit 7e6ccc5ce728ab678ae448e897cc7bbd2cc630b5
Author: David Bosschaert <bo...@adobe.com>
AuthorDate: Thu May 3 14:59:22 2018 +0100

    Fix JSON repoinit reader test
---
 .../java/org/apache/sling/feature/io/json/FeatureJSONReaderTest.java   | 3 +--
 src/test/resources/features/repoinit2.json                             | 2 +-
 2 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/src/test/java/org/apache/sling/feature/io/json/FeatureJSONReaderTest.java b/src/test/java/org/apache/sling/feature/io/json/FeatureJSONReaderTest.java
index 47ab83b..6acd293 100644
--- a/src/test/java/org/apache/sling/feature/io/json/FeatureJSONReaderTest.java
+++ b/src/test/java/org/apache/sling/feature/io/json/FeatureJSONReaderTest.java
@@ -25,7 +25,6 @@ import org.apache.sling.feature.Extensions;
 import org.apache.sling.feature.Feature;
 import org.apache.sling.feature.Include;
 import org.apache.sling.feature.KeyValueMap;
-import org.apache.sling.feature.io.json.FeatureJSONReader;
 import org.apache.sling.feature.io.json.FeatureJSONReader.SubstituteVariables;
 import org.junit.Test;
 import org.osgi.resource.Capability;
@@ -192,7 +191,7 @@ public class FeatureJSONReaderTest {
         Extensions extensions = feature.getExtensions();
         assertEquals(1, extensions.size());
         Extension ext = extensions.iterator().next();
-        assertEquals("some repo init\ntext\n", ext.getText());
+        assertEquals("[\"some repo init\",\"text\"]", ext.getJSON());
     }
 
     @Test public void testHandleVars() throws Exception {
diff --git a/src/test/resources/features/repoinit2.json b/src/test/resources/features/repoinit2.json
index beef986..0130729 100644
--- a/src/test/resources/features/repoinit2.json
+++ b/src/test/resources/features/repoinit2.json
@@ -1,6 +1,6 @@
 {
     "id": "test/repoinit2/1.0.0",
-    "repoinit:TEXT|false": [
+    "repoinit:JSON|false": [
         "some repo init",
         "text"
     ]

-- 
To stop receiving notification emails like this one, please contact
davidb@apache.org.