incubator-sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bdelacre...@apache.org
Subject svn commit: r1338621 - /sling/trunk/installer/providers/jcr/src/test/java/org/apache/sling/installer/provider/jcr/impl/FolderNameFilterTest.java
Date Tue, 15 May 2012 10:16:32 GMT
Author: bdelacretaz
Date: Tue May 15 10:16:32 2012
New Revision: 1338621

URL: http://svn.apache.org/viewvc?rev=1338621&view=rev
Log:
Add some config.* tests

Modified:
    sling/trunk/installer/providers/jcr/src/test/java/org/apache/sling/installer/provider/jcr/impl/FolderNameFilterTest.java

Modified: sling/trunk/installer/providers/jcr/src/test/java/org/apache/sling/installer/provider/jcr/impl/FolderNameFilterTest.java
URL: http://svn.apache.org/viewvc/sling/trunk/installer/providers/jcr/src/test/java/org/apache/sling/installer/provider/jcr/impl/FolderNameFilterTest.java?rev=1338621&r1=1338620&r2=1338621&view=diff
==============================================================================
--- sling/trunk/installer/providers/jcr/src/test/java/org/apache/sling/installer/provider/jcr/impl/FolderNameFilterTest.java
(original)
+++ sling/trunk/installer/providers/jcr/src/test/java/org/apache/sling/installer/provider/jcr/impl/FolderNameFilterTest.java
Tue May 15 10:16:32 2012
@@ -29,6 +29,7 @@ import org.junit.Test;
 
 public class FolderNameFilterTest {
     public static final String DEFAULT_REGEXP =  ".*/install$";
+    public static final String CONFIG_REGEXP =  ".*/config$";
     public static final String [] ROOTS = JcrInstaller.DEFAULT_SEARCH_PATH;
 
     @Test
@@ -128,6 +129,18 @@ public class FolderNameFilterTest {
     }
 
     @Test
+    public void testAuthorPriorities() {
+        final Set<String> m = new HashSet<String>();
+        m.add("author");
+        m.add("mycompany");
+        m.add("dev");
+        final FolderNameFilter f = new FolderNameFilter(ROOTS, CONFIG_REGEXP, m);
+        assertEquals("", new Integer(201), (Integer)f.getPriority("/apps/somewhere/runmodes/config.author"));
+        assertEquals("", new Integer(202), (Integer)f.getPriority("/apps/somewhere/runmodes/config.author.dev"));
+        assertEquals("", new Integer(203), (Integer)f.getPriority("/apps/somewhere/runmodes/config.author.dev.mycompany"));
+    }
+
+    @Test
     public void testDotsInPath() {
         final Set<String> m = new HashSet<String>();
         m.add("dev");



Mime
View raw message