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/09/18 16:00:22 UTC

[sling-org-apache-sling-feature-io] branch master updated: Update repoinit reading test to reflect repoinit TEXT support.

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 02bc56a  Update repoinit reading test to reflect repoinit TEXT support.
02bc56a is described below

commit 02bc56a7abd82d9b88cc1c4bf6e75cf0a0e527a2
Author: David Bosschaert <bo...@adobe.com>
AuthorDate: Tue Sep 18 17:59:46 2018 +0200

    Update repoinit reading test to reflect repoinit TEXT support.
---
 .../feature/io/json/FeatureJSONReaderTest.java     | 24 +++++++---------------
 src/test/resources/features/repoinit2.json         |  2 +-
 2 files changed, 8 insertions(+), 18 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 f231711..0d4537e 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
@@ -16,28 +16,18 @@
  */
 package org.apache.sling.feature.io.json;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertNull;
-import static org.junit.Assert.assertTrue;
-
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.Dictionary;
-import java.util.List;
-
-import org.apache.sling.feature.ArtifactId;
-import org.apache.sling.feature.Bundles;
 import org.apache.sling.feature.Configuration;
-import org.apache.sling.feature.Configurations;
 import org.apache.sling.feature.Extension;
 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.junit.Test;
 import org.osgi.resource.Capability;
-import org.osgi.resource.Requirement;
+
+import java.util.Arrays;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNull;
 
 public class FeatureJSONReaderTest {
 
@@ -78,7 +68,7 @@ public class FeatureJSONReaderTest {
         Extensions extensions = feature.getExtensions();
         assertEquals(1, extensions.size());
         Extension ext = extensions.iterator().next();
-        assertEquals("[\"some repo init\",\"text\"]", ext.getJSON());
+        assertEquals("some repo init\ntext\n", ext.getText());
     }
 
     @Test public void testReadArtifactsExtensions() throws Exception {
diff --git a/src/test/resources/features/repoinit2.json b/src/test/resources/features/repoinit2.json
index 0130729..beef986 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:JSON|false": [
+    "repoinit:TEXT|false": [
         "some repo init",
         "text"
     ]