sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pa...@apache.org
Subject [sling-org-apache-sling-feature-resolver] branch master updated: Fix one of the tests that assumes a certain order in a list which can not be assumed.
Date Mon, 30 Apr 2018 15:01:48 GMT
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/master by this push:
     new 2edb61c  Fix one of the tests that assumes a certain order in a list which can not
be assumed.
2edb61c is described below

commit 2edb61c8994ab23d6cf933f2f0878ff423168ccd
Author: Karl Pauls <karlpauls@gmail.com>
AuthorDate: Mon Apr 30 17:01:38 2018 +0200

    Fix one of the tests that assumes a certain order in a list which can not be assumed.
---
 .../apache/sling/feature/resolver/impl/BundleResourceImplTest.java   | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/test/java/org/apache/sling/feature/resolver/impl/BundleResourceImplTest.java
b/src/test/java/org/apache/sling/feature/resolver/impl/BundleResourceImplTest.java
index 0bd9b7d..ef07700 100644
--- a/src/test/java/org/apache/sling/feature/resolver/impl/BundleResourceImplTest.java
+++ b/src/test/java/org/apache/sling/feature/resolver/impl/BundleResourceImplTest.java
@@ -47,6 +47,7 @@ import java.util.jar.JarOutputStream;
 import java.util.jar.Manifest;
 
 import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertSame;
 import static org.junit.Assert.assertTrue;
@@ -82,7 +83,9 @@ public class BundleResourceImplTest {
 
         assertEquals(0, res.getCapabilities("nonexistent").size());
         assertEquals(0, res.getRequirements("ns.2").size());
-        assertEquals(expectedCaps1, res.getCapabilities("ns.1"));
+        List<Capability> caps = res.getCapabilities("ns.1");
+        assertEquals(expectedCaps1.size(), caps.size());
+        assertTrue(expectedCaps1.containsAll(caps));
         assertEquals(expectedReqs, res.getRequirements("ns.1"));
 
         List<Capability> mergedCaps = res.getCapabilities(null);

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

Mime
View raw message