Package org.apache.cactus.extension.jsp

Examples of org.apache.cactus.extension.jsp.JspTagLifecycle


     */
    public void testAssertScopedVariableExposedWithIllegalScope()
    {
        try
        {
            JspTagLifecycle lifecycle =
                new JspTagLifecycle(pageContext, new OutTag());
            lifecycle.expectScopedVariableExposed(
                "name", new Object[]{"value"}, 0);
            fail("Expected IllegalArgumentException");
        }
        catch (IllegalArgumentException expected)
        {
View Full Code Here


     */
    public void testOutTag()
        throws JspException, IOException
    {
        OutTag tag = new OutTag();
        JspTagLifecycle lifecycle = new JspTagLifecycle(pageContext, tag);
        tag.setValue("Value");
        lifecycle.expectBodySkipped();
        lifecycle.invoke();
    }
View Full Code Here

     */
    public void testOutTagEscapeXml()
        throws JspException, IOException
    {
        OutTag tag = new OutTag();
        JspTagLifecycle lifecycle = new JspTagLifecycle(pageContext, tag);
        tag.setValue("<value/>");
        lifecycle.expectBodySkipped();
        lifecycle.invoke();
    }
View Full Code Here

    public void testOutTagNoEscapeXml()
        throws JspException, IOException
    {
        OutTag tag = new OutTag();
        tag.setEscapeXml("false");
        JspTagLifecycle lifecycle = new JspTagLifecycle(pageContext, tag);
        tag.setValue("<value/>");
        lifecycle.expectBodySkipped();
        lifecycle.invoke();
    }
View Full Code Here

     */
    public void testOutTagDefaultAttribute()
        throws JspException, IOException
    {
        OutTag tag = new OutTag();
        JspTagLifecycle lifecycle = new JspTagLifecycle(pageContext, tag);
        tag.setValue(null);
        tag.setDefault("Default");
        lifecycle.expectBodySkipped();
        lifecycle.invoke();
    }
View Full Code Here

     */
    public void testOutTagDefaultAttributeIgnored()
        throws JspException, IOException
    {
        OutTag tag = new OutTag();
        JspTagLifecycle lifecycle = new JspTagLifecycle(pageContext, tag);
        tag.setValue("Value");
        tag.setDefault("Default");
        lifecycle.expectBodySkipped();
        lifecycle.invoke();
    }
View Full Code Here

     */
    public void testOutTagDefaultBody()
        throws JspException, IOException
    {
        OutTag tag = new OutTag();
        JspTagLifecycle lifecycle = new JspTagLifecycle(pageContext, tag);
        tag.setValue(null);
        lifecycle.addNestedText("Default");
        lifecycle.expectBodyEvaluated();
        lifecycle.invoke();
    }
View Full Code Here

     */
    public void testOutTagDefaultBodyIgnored()
        throws JspException, IOException
    {
        OutTag tag = new OutTag();
        JspTagLifecycle lifecycle = new JspTagLifecycle(pageContext, tag);
        tag.setValue("Value");
        lifecycle.addNestedText("Default");
        lifecycle.expectBodySkipped();
        lifecycle.invoke();
    }
View Full Code Here

     */
    public void testSetTag()
        throws JspException, IOException
    {
        SetTag tag = new SetTag();
        JspTagLifecycle lifecycle = new JspTagLifecycle(pageContext, tag);
        tag.setVar("Var");
        tag.setValue("Value");
        lifecycle.invoke();
        assertEquals("Value", pageContext.findAttribute("Var"));
    }
View Full Code Here

     */
    public void testForEachTag()
        throws JspException, IOException
    {
        ForEachTag tag = new ForEachTag();
        JspTagLifecycle lifecycle = new JspTagLifecycle(pageContext, tag);
        tag.setVar("Item");
        tag.setItems("One,Two,Three");
        lifecycle.expectBodyEvaluated(3);
        lifecycle.expectScopedVariableExposed(
            "Item", new Object[] {"One", "Two", "Three"});
        lifecycle.invoke();
    }
View Full Code Here

TOP

Related Classes of org.apache.cactus.extension.jsp.JspTagLifecycle

Copyright © 2018 www.massapicom. 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.