use of org.apache.sling.api.request.RequestPathInfo in project sling by apache.
the class SlingRequestPathInfoTest method testTrailingDotDotDotWithSuffix.
public void testTrailingDotDotDotWithSuffix() {
RequestPathInfo p = new SlingRequestPathInfo(new MockResource("/some/path", ".../suffix"));
assertEquals("/some/path", p.getResourcePath());
assertNull("Selectors are null", p.getSelectorString());
assertEquals(0, p.getSelectors().length);
assertNull("Extension is null", p.getExtension());
assertEquals("/suffix", p.getSuffix());
}
use of org.apache.sling.api.request.RequestPathInfo in project sling by apache.
the class SlingRequestPathInfoTest method testTrailingDotWithSuffix.
public void testTrailingDotWithSuffix() {
RequestPathInfo p = new SlingRequestPathInfo(new MockResource("/some/path", "./suffix"));
assertEquals("/some/path", p.getResourcePath());
assertNull("Selectors are null", p.getSelectorString());
assertEquals(0, p.getSelectors().length);
assertNull("Extension is null", p.getExtension());
assertEquals("/suffix", p.getSuffix());
}
use of org.apache.sling.api.request.RequestPathInfo in project sling by apache.
the class SlingRequestPathInfoTest method testPartialResolutionD.
public void testPartialResolutionD() {
RequestPathInfo p = new SlingRequestPathInfo(new MockResource("/some/path.print.a4", ".html/some/suffix"));
assertEquals("/some/path.print.a4", p.getResourcePath());
assertNull("Selectors are null", p.getSelectorString());
assertEquals(0, p.getSelectors().length);
assertEquals("html", p.getExtension());
assertEquals("/some/suffix", p.getSuffix());
}
use of org.apache.sling.api.request.RequestPathInfo in project sling by apache.
the class SlingRequestPathInfoTest method testJIRA_250_a.
public void testJIRA_250_a() {
RequestPathInfo p = new SlingRequestPathInfo(new MockResource("/bunkai", ".1.json"));
assertEquals("/bunkai", p.getResourcePath());
assertEquals("json", p.getExtension());
assertEquals("1", p.getSelectorString());
}
use of org.apache.sling.api.request.RequestPathInfo in project sling by apache.
the class SlingRequestPathInfoTest method testJIRA_250_b.
public void testJIRA_250_b() {
RequestPathInfo p = new SlingRequestPathInfo(new MockResource("/", ".1.json"));
assertEquals("/", p.getResourcePath());
assertEquals("json", p.getExtension());
assertNull("Suffix is null", p.getSuffix());
assertEquals("Selector string must not be null", "1", p.getSelectorString());
}
Aggregations