Package org.apache.tapestry.form

Examples of org.apache.tapestry.form.ValidationMessages


{

    public void testOK() throws Exception
    {
        IFormComponent field = newField();
        ValidationMessages messages = newMessages();

        String object = "short and sweet";

        replay();
View Full Code Here


    }

    public void testFail()
    {
        IFormComponent field = newField("My Field");
        ValidationMessages messages = newMessages(
                null,
                ValidationStrings.VALUE_TOO_LONG,
                new Object[]
                { new Integer(10), "My Field" },
                "Exception!");
View Full Code Here

    }

    public void testFailCustomMessage()
    {
        IFormComponent field = newField("My Field");
        ValidationMessages messages = newMessages(
                "Too Long",
                ValidationStrings.VALUE_TOO_LONG,
                new Object[]
                { new Integer(10), "My Field" },
                "Exception!");
View Full Code Here

{

    public void test_OK() throws Exception
    {
        IFormComponent field = newField();
        ValidationMessages messages = newMessages();

        Integer object = new Integer(10);

        replay();
View Full Code Here

    }

    public void test_Fail()
    {
        IFormComponent field = newField("My Field");
        ValidationMessages messages = newMessages(
                null,
                ValidationStrings.VALUE_TOO_LARGE,
                new Object[]
                        { "My Field", new Double(10).toString() },
                "Exception!");

        expect(messages.getLocale()).andReturn(Locale.getDefault()).atLeastOnce();

        replay();

        try
        {
View Full Code Here

    }

    public void test_Fail_Custom_Message()
    {
        IFormComponent field = newField("My Field");
        ValidationMessages messages = newMessages(
                "custom",
                ValidationStrings.VALUE_TOO_LARGE,
                new Object[]
                        { "My Field", new Double(100).toString() },
                "custom message");
View Full Code Here

public class TestMinLength extends BaseValidatorTestCase
{
    public void testOK() throws Exception
    {
        IFormComponent field = newField();
        ValidationMessages messages = newMessages();

        String object = "a nice long string";

        replay();
View Full Code Here

    }

    public void testFail()
    {
        IFormComponent field = newField("My Field");
        ValidationMessages messages = newMessages(
                null,
                ValidationStrings.VALUE_TOO_SHORT,
                new Object[]
                { new Integer(10), "My Field" },
                "Exception!");
View Full Code Here

    }

    public void testFailCustomMessage()
    {
        IFormComponent field = newField("My Field");
        ValidationMessages messages = newMessages(
                "Too Short",
                ValidationStrings.VALUE_TOO_SHORT,
                new Object[]
                { new Integer(10), "My Field" },
                "Exception!");
View Full Code Here

public class TestRequired extends BaseValidatorTestCase
{
    public void testValidateNotNull() throws Exception
    {
        IFormComponent field = newField();
        ValidationMessages messages = newMessages();

        replayControls();

        new Required().validate(field, messages, "not null");
View Full Code Here

TOP

Related Classes of org.apache.tapestry.form.ValidationMessages

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.