You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by cz...@apache.org on 2020/04/29 08:29:07 UTC

[sling-org-apache-sling-feature-apiregions] branch master updated: Fix ActivatorTest on Windows

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

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


The following commit(s) were added to refs/heads/master by this push:
     new 75e06c0  Fix ActivatorTest on Windows
75e06c0 is described below

commit 75e06c05e2c5fe8776c61d930eefe4bf3a680508
Author: Carsten Ziegeler <cz...@apache.org>
AuthorDate: Wed Apr 29 10:28:56 2020 +0200

    Fix ActivatorTest on Windows
---
 .../sling/feature/apiregions/impl/ActivatorTest.java     | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/src/test/java/org/apache/sling/feature/apiregions/impl/ActivatorTest.java b/src/test/java/org/apache/sling/feature/apiregions/impl/ActivatorTest.java
index 10cd4a3..6b0a984 100644
--- a/src/test/java/org/apache/sling/feature/apiregions/impl/ActivatorTest.java
+++ b/src/test/java/org/apache/sling/feature/apiregions/impl/ActivatorTest.java
@@ -72,16 +72,16 @@ public class ActivatorTest {
 
     @Test
     public void testStart() throws Exception {
-        String i = getClass().getResource("/idbsnver1.properties").getFile();
-        String b = getClass().getResource("/bundles1.properties").getFile();
-        String f = getClass().getResource("/features1.properties").getFile();
-        String r = getClass().getResource("/regions1.properties").getFile();
+        String i = getClass().getResource("/idbsnver1.properties").toURI().toString();
+        String b = getClass().getResource("/bundles1.properties").toURI().toString();
+        String f = getClass().getResource("/features1.properties").toURI().toString();
+        String r = getClass().getResource("/regions1.properties").toURI().toString();
 
         Dictionary<String, Object> expectedProps = new Hashtable<>();
-        expectedProps.put(IDBSNVER_FILENAME, new File(i).toURI().toString());
-        expectedProps.put(BUNDLE_FEATURE_FILENAME, new File(b).toURI().toString());
-        expectedProps.put(FEATURE_REGION_FILENAME, new File(f).toURI().toString());
-        expectedProps.put(REGION_PACKAGE_FILENAME, new File(r).toURI().toString());
+        expectedProps.put(IDBSNVER_FILENAME, i);
+        expectedProps.put(BUNDLE_FEATURE_FILENAME, b);
+        expectedProps.put(FEATURE_REGION_FILENAME, f);
+        expectedProps.put(REGION_PACKAGE_FILENAME, r);
 
         BundleContext bc = Mockito.mock(BundleContext.class);
         Mockito.when(bc.getBundle()).thenReturn(Mockito.mock(Bundle.class));