Examples of providesValue()


Examples of org.apache.sling.servlets.post.impl.helper.RequestProperty.providesValue()

        Map<String, RequestProperty> props = collectContent(p("./param", ""));

        assertEquals(1, props.size());
        RequestProperty prop = props.get("/test/path/param");
        assertTrue(prop.hasValues());
        assertFalse(prop.providesValue());
        assertEquals(1, prop.getStringValues().length);
        assertEquals("", prop.getStringValues()[0]);
    }

    @Test
View Full Code Here

Examples of org.apache.sling.servlets.post.impl.helper.RequestProperty.providesValue()

        Map<String, RequestProperty> props = collectContent(p("./param", ""), p("./param@DefaultValue", ":ignore"));

        assertEquals(1, props.size());
        RequestProperty prop = props.get("/test/path/param");
        assertTrue(prop.hasValues());
        assertFalse(prop.providesValue());
        assertEquals(0, prop.getStringValues().length);
    }

    @Test
    public void testSingleValueWithDefaultToNull() throws Throwable {
View Full Code Here

Examples of org.apache.sling.servlets.post.impl.helper.RequestProperty.providesValue()

        Map<String, RequestProperty> props = collectContent(p("./param", ""), p("./param@DefaultValue", ":null"));

        assertEquals(1, props.size());
        RequestProperty prop = props.get("/test/path/param");
        assertTrue(prop.hasValues());
        assertTrue(prop.providesValue());
        assertNull(prop.getStringValues());
    }

    @Test
    public void testSingleValueIgnoringBlanks() throws Throwable {
View Full Code Here

Examples of org.apache.sling.servlets.post.impl.helper.RequestProperty.providesValue()

        Map<String, RequestProperty> props = collectContent(p("./param", "true", "false"));

        assertEquals(1, props.size());
        RequestProperty prop = props.get("/test/path/param");
        assertTrue(prop.hasValues());
        assertTrue(prop.providesValue());
        assertEquals(2, prop.getStringValues().length);
        assertEquals("true", prop.getStringValues()[0]);
        assertEquals("false", prop.getStringValues()[1]);
    }
View Full Code Here

Examples of org.apache.sling.servlets.post.impl.helper.RequestProperty.providesValue()

        Map<String, RequestProperty> props = collectContent(p("./param", "true", ""));

        assertEquals(1, props.size());
        RequestProperty prop = props.get("/test/path/param");
        assertTrue(prop.hasValues());
        assertTrue(prop.providesValue());
        assertEquals(2, prop.getStringValues().length);
        assertEquals("true", prop.getStringValues()[0]);
        assertEquals("", prop.getStringValues()[1]);
    }
View Full Code Here

Examples of org.apache.sling.servlets.post.impl.helper.RequestProperty.providesValue()

        Map<String, RequestProperty> props = collectContent(p("./param", "true", "", ""));

        assertEquals(1, props.size());
        RequestProperty prop = props.get("/test/path/param");
        assertTrue(prop.hasValues());
        assertTrue(prop.providesValue());
        assertEquals(3, prop.getStringValues().length);
        assertEquals("true", prop.getStringValues()[0]);
        assertEquals("", prop.getStringValues()[1]);
        assertEquals("", prop.getStringValues()[2]);
    }
View Full Code Here

Examples of org.apache.sling.servlets.post.impl.helper.RequestProperty.providesValue()

        Map<String, RequestProperty> props = collectContent(p("./param", "", "", ""));

        assertEquals(1, props.size());
        RequestProperty prop = props.get("/test/path/param");
        assertTrue(prop.hasValues());
        assertFalse(prop.providesValue());
        assertEquals(3, prop.getStringValues().length);
        assertEquals("", prop.getStringValues()[0]);
        assertEquals("", prop.getStringValues()[1]);
        assertEquals("", prop.getStringValues()[2]);
    }
View Full Code Here

Examples of org.apache.sling.servlets.post.impl.helper.RequestProperty.providesValue()

        Map<String, RequestProperty> props = collectContent(p("./param", "true", ""));

        assertEquals(1, props.size());
        RequestProperty prop = props.get("/test/path/param");
        assertTrue(prop.hasValues());
        assertTrue(prop.providesValue());
        assertEquals(2, prop.getStringValues().length);
        assertEquals("true", prop.getStringValues()[0]);
        assertEquals("", prop.getStringValues()[1]);
    }
View Full Code Here

Examples of org.apache.sling.servlets.post.impl.helper.RequestProperty.providesValue()

        Map<String, RequestProperty> props = collectContent(p("./param", "true", "", ""), p("./param@IgnoreBlanks", "true"));

        assertEquals(1, props.size());
        RequestProperty prop = props.get("/test/path/param");
        assertTrue(prop.hasValues());
        assertTrue(prop.providesValue());
        assertEquals(1, prop.getStringValues().length);
        assertEquals("true", prop.getStringValues()[0]);
    }

    @Test
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.