jackrabbit-oak-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mdue...@apache.org
Subject svn commit: r1305878 - /jackrabbit/oak/trunk/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/RepositoryTest.java
Date Tue, 27 Mar 2012 15:51:31 GMT
Author: mduerig
Date: Tue Mar 27 15:51:30 2012
New Revision: 1305878

URL: http://svn.apache.org/viewvc?rev=1305878&view=rev
Log:
OAK-15: Clean up oak-jcr
add removed tests back and ignore them

Modified:
    jackrabbit/oak/trunk/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/RepositoryTest.java

Modified: jackrabbit/oak/trunk/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/RepositoryTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/RepositoryTest.java?rev=1305878&r1=1305877&r2=1305878&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/RepositoryTest.java
(original)
+++ jackrabbit/oak/trunk/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/RepositoryTest.java
Tue Mar 27 15:51:30 2012
@@ -114,6 +114,54 @@ public class RepositoryTest extends Abst
         assertNotNull(getSession());
     }
 
+    @Ignore("WIP")
+    @Test(expected = NoSuchWorkspaceException.class)
+    public void loginInvalidWorkspace() throws RepositoryException {
+        Repository repository = getRepository();
+        repository.login("invalid");
+    }
+
+    @Ignore("WIP")
+    @Test
+    public void getWorkspaceNames() throws RepositoryException {
+        String[] workspaces = getSession().getWorkspace().getAccessibleWorkspaceNames();
+
+        Set<String> names = new HashSet<String>() {{
+            add("default");
+        }};
+
+        assertTrue(asList(workspaces).containsAll(names));
+        assertTrue(names.containsAll(asList(workspaces)));
+    }
+
+    @Ignore("WIP")
+    @Test
+    public void createDeleteWorkspace() throws RepositoryException {
+        getSession().getWorkspace().createWorkspace("new");
+
+        Session session2 = getRepository().login();
+        try {
+            String[] workspaces = session2.getWorkspace().getAccessibleWorkspaceNames();
+            assertTrue(asList(workspaces).contains("new"));
+            Session session3 = getRepository().login("new");
+            assertEquals("new", session3.getWorkspace().getName());
+            session3.logout();
+            session2.getWorkspace().deleteWorkspace("new");
+        }
+        finally {
+            session2.logout();
+        }
+
+        Session session4 = getRepository().login();
+        try {
+            String[] workspaces = session4.getWorkspace().getAccessibleWorkspaceNames();
+            assertFalse(asList(workspaces).contains("new"));
+        }
+        finally {
+            session4.logout();
+        }
+    }
+
     @Test
     public void getRoot() throws RepositoryException {
         Node root = getSession().getRootNode();



Mime
View raw message