Package org.apache.jackrabbit.oak.core

Examples of org.apache.jackrabbit.oak.core.ContentRepositoryImpl.login()


public class NamespaceMappingsTest {

    @Test
    public void testMappings() throws Exception {
        ContentRepository repository = new ContentRepositoryImpl();
        ContentSession session = repository.login(null, "default");
        NamespaceMappings r = new NamespaceMappings(session);

        r.registerNamespace("p", "n");
        assertEquals(r.getURI("p"), "n");
        assertEquals(r.getPrefix("n"), "p");
View Full Code Here


public class NamespaceRegistryImplTest {

    @Test
    public void testMappings() throws Exception {
        ContentRepository repository = new ContentRepositoryImpl();
        ContentSession session = repository.login(new GuestCredentials(), null);
        NamespaceRegistry r = new NamespaceRegistryImpl(session);

        assertEquals("", r.getURI(""));
        assertEquals("http://www.jcp.org/jcr/1.0", r.getURI("jcr"));
        assertEquals("http://www.jcp.org/jcr/nt/1.0", r.getURI("nt"));
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.