Examples of SlingRequestPathInfo


Examples of org.apache.sling.engine.impl.request.SlingRequestPathInfo

        assertNull("Extension is null",p.getExtension());
        assertEquals("/suffix", p.getSuffix());
    }

    public void testAllOptions() {
        RequestPathInfo p = new SlingRequestPathInfo(new MockResource(
            "/some/path", ".print.a4.html/some/suffix"));
        assertEquals("/some/path", p.getResourcePath());
        assertEquals("print.a4", p.getSelectorString());
        assertEquals(2, p.getSelectors().length);
        assertEquals("print", p.getSelectors()[0]);
        assertEquals("a4", p.getSelectors()[1]);
        assertEquals("html", p.getExtension());
        assertEquals("/some/suffix", p.getSuffix());
    }
View Full Code Here

Examples of org.apache.sling.engine.impl.request.SlingRequestPathInfo

        assertEquals("html", p.getExtension());
        assertEquals("/some/suffix", p.getSuffix());
    }

    public void testAllEmpty() {
        RequestPathInfo p = new SlingRequestPathInfo(
            new MockResource("/", null));
        assertEquals("/", p.getResourcePath());
        assertNull("Selectors are null",p.getSelectorString());
        assertEquals(0, p.getSelectors().length);
        assertNull("Extension is null",p.getExtension());
        assertNull("Suffix is null",p.getSuffix());
    }
View Full Code Here

Examples of org.apache.sling.engine.impl.request.SlingRequestPathInfo

        assertNull("Extension is null",p.getExtension());
        assertNull("Suffix is null",p.getSuffix());
    }

    public void testPathOnly() {
        RequestPathInfo p = new SlingRequestPathInfo(new MockResource(
            "/some/path/here", ""));
        assertEquals("/some/path/here", p.getResourcePath());
        assertNull("Selectors are null",p.getSelectorString());
        assertEquals(0, p.getSelectors().length);
        assertNull("Extension is null",p.getExtension());
        assertNull("Suffix is null",p.getSuffix());
    }
View Full Code Here

Examples of org.apache.sling.engine.impl.request.SlingRequestPathInfo

        assertNull("Extension is null",p.getExtension());
        assertNull("Suffix is null",p.getSuffix());
    }

    public void testPathWithExtensionOnly() {
        RequestPathInfo p = new SlingRequestPathInfo(new MockResource(
            "/some/path/here.html", ""));
        assertEquals("/some/path/here.html", p.getResourcePath());
        assertNull("Selectors are null",p.getSelectorString());
        assertEquals(0, p.getSelectors().length);
        assertNull("Extension is null",p.getExtension());
        assertNull("Suffix is null",p.getSuffix());
    }
View Full Code Here

Examples of org.apache.sling.engine.impl.request.SlingRequestPathInfo

        assertNull("Extension is null",p.getExtension());
        assertNull("Suffix is null",p.getSuffix());
    }

    public void testPathAndExtensionOnly() {
        RequestPathInfo p = new SlingRequestPathInfo(new MockResource(
            "/some/path/here", ".html"));
        assertEquals("/some/path/here", p.getResourcePath());
        assertNull("Selectors are null",p.getSelectorString());
        assertEquals(0, p.getSelectors().length);
        assertEquals("html", p.getExtension());
        assertNull("Suffix is null",p.getSuffix());
    }
View Full Code Here

Examples of org.apache.sling.engine.impl.request.SlingRequestPathInfo

        assertEquals("html", p.getExtension());
        assertNull("Suffix is null",p.getSuffix());
    }

    public void testPathAndOneSelectorOnly() {
        RequestPathInfo p = new SlingRequestPathInfo(new MockResource(
            "/some/path/here", ".print.html"));
        assertEquals("/some/path/here", p.getResourcePath());
        assertEquals("print", p.getSelectorString());
        assertEquals(1, p.getSelectors().length);
        assertEquals("print", p.getSelectors()[0]);
        assertEquals("html", p.getExtension());
        assertNull("Suffix is null",p.getSuffix());
    }
View Full Code Here

Examples of org.apache.sling.engine.impl.request.SlingRequestPathInfo

        assertEquals("html", p.getExtension());
        assertNull("Suffix is null",p.getSuffix());
    }

    public void testPathExtAndSuffix() {
        RequestPathInfo p = new SlingRequestPathInfo(new MockResource(
            "/some/path/here", ".html/something"));
        assertEquals("/some/path/here", p.getResourcePath());
        assertNull("Selectors are null",p.getSelectorString());
        assertEquals(0, p.getSelectors().length);
        assertEquals("html", p.getExtension());
        assertEquals("/something", p.getSuffix());
    }
View Full Code Here

Examples of org.apache.sling.engine.impl.request.SlingRequestPathInfo

        assertEquals("html", p.getExtension());
        assertEquals("/something", p.getSuffix());
    }

    public void testSelectorsSplit() {
        RequestPathInfo p = new SlingRequestPathInfo(new MockResource(
            "/some/path", ".print.a4.html/some/suffix"));
        assertEquals("/some/path", p.getResourcePath());
        assertEquals(2, p.getSelectors().length);
        assertEquals("print", p.getSelectors()[0]);
        assertEquals("a4", p.getSelectors()[1]);
        assertEquals("html", p.getExtension());
        assertEquals("/some/suffix", p.getSuffix());
    }
View Full Code Here

Examples of org.apache.sling.engine.impl.request.SlingRequestPathInfo

        assertEquals("html", p.getExtension());
        assertEquals("/some/suffix", p.getSuffix());
    }

    public void testPartialResolutionB() {
        RequestPathInfo p = new SlingRequestPathInfo(new MockResource(
            "/some/path", ".print.a4.html/some/suffix"));
        assertEquals("/some/path", p.getResourcePath());
        assertEquals("print.a4", p.getSelectorString());
        assertEquals(2, p.getSelectors().length);
        assertEquals("print", p.getSelectors()[0]);
        assertEquals("a4", p.getSelectors()[1]);
        assertEquals("html", p.getExtension());
        assertEquals("/some/suffix", p.getSuffix());
    }
View Full Code Here

Examples of org.apache.sling.engine.impl.request.SlingRequestPathInfo

        assertEquals("html", p.getExtension());
        assertEquals("/some/suffix", p.getSuffix());
    }

    public void testPartialResolutionC() {
        RequestPathInfo p = new SlingRequestPathInfo(new MockResource(
            "/some/path.print", ".a4.html/some/suffix"));
        assertEquals("/some/path.print", p.getResourcePath());
        assertEquals("a4", p.getSelectorString());
        assertEquals(1, p.getSelectors().length);
        assertEquals("a4", p.getSelectors()[0]);
        assertEquals("html", p.getExtension());
        assertEquals("/some/suffix", p.getSuffix());
    }
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.