Examples of IFormComponent


Examples of org.apache.tapestry.form.IFormComponent

        verifyControls();
    }

    public void testTooShort()
    {
        IFormComponent field = newField("short");

        replayControls();

        v.setMinimumLength(20);
View Full Code Here

Examples of org.apache.tapestry.form.IFormComponent

        verifyControls();
    }

    public void testOverrideMinimumLengthMessage()
    {
        IFormComponent field = newField("short");

        replayControls();

        v.setMinimumLength(20);
        v.setMinimumLengthMessage("URLs must be at least 20 characters.");
View Full Code Here

Examples of org.apache.tapestry.form.IFormComponent

    public void testDisallowedProtocol()
    {
        IPage page = newPage(Locale.ENGLISH);
        MockControl control = newControl(IFormComponent.class);
        IFormComponent field = (IFormComponent) control.getMock();

        field.getPage();
        control.setReturnValue(page);

        replayControls();

        v.setAllowedProtocols("http,https");
View Full Code Here

Examples of org.apache.tapestry.form.IFormComponent

public class TestValidationDelegate extends BaseValidatorTestCase
{
    protected IFormComponent newField(String name, int count)
    {
        MockControl control = newControl(IFormComponent.class);
        IFormComponent fc = (IFormComponent) control.getMock();

        fc.getName();
        control.setReturnValue(name, count);

        return fc;
    }
View Full Code Here

Examples of org.apache.tapestry.form.IFormComponent

        assertNull(d.getFirstError());
    }

    public void testInvalidInput()
    {
        IFormComponent field = newField("testAdd", 3);

        replayControls();

        String errorMessage = "Need a bigger one.";
View Full Code Here

Examples of org.apache.tapestry.form.IFormComponent

        verifyControls();
    }

    public void testValidatorErrorRenderer()
    {
        IFormComponent field = newField("testValidatorErrorRenderer", 3);

        replayControls();

        IRender errorRenderer = new RenderString("Just don't like it.");
View Full Code Here

Examples of org.apache.tapestry.form.IFormComponent

        verifyControls();
    }

    public void testNoError()
    {
        IFormComponent field = newField("input", 2);

        replayControls();

        d.setFormComponent(field);
        d.recordFieldInputValue("Futurama");
View Full Code Here

Examples of org.apache.tapestry.form.IFormComponent

        verifyControls();
    }

    public void testUnassociatedErrors()
    {
        IFormComponent field = newField("input", 2);

        replayControls();

        d.setFormComponent(field);
        d.recordFieldInputValue("Bender");
View Full Code Here

Examples of org.apache.tapestry.form.IFormComponent

        assertEquals(errorMessage, ((RenderString) render).getString());
    }

    public void testMultipleInvalidInput()
    {
        IFormComponent f1 = newField("monty", 3);
        IFormComponent f2 = newField("python", 3);

        replayControls();

        String e1 = "And now for something completely different.";
        String e2 = "A man with three buttocks.";
View Full Code Here

Examples of org.apache.tapestry.form.IFormComponent

        verifyControls();
    }

    public void testReset()
    {
        IFormComponent f1 = newField("monty", 4);
        IFormComponent f2 = newField("python", 3);

        replayControls();

        String e1 = "And now for something completely different.";
        String e2 = "A man with three buttocks.";
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.