Package org.apache.tapestry.form.translator

Examples of org.apache.tapestry.form.translator.Translator


        MockControl delegateControl = newControl(IValidationDelegate.class);
        IValidationDelegate delegate = (IValidationDelegate) delegateControl.getMock();

        MockControl translatorControl = newControl(Translator.class);
        Translator translator = (Translator) translatorControl.getMock();

        String text = "test";

        field.getForm();
        fieldControl.setReturnValue(form);

        form.getDelegate();
        formControl.setReturnValue(delegate);

        delegate.recordFieldInputValue(text);

        field.getTranslator();
        fieldControl.setReturnValue(translator);

        ValidatorException expected = new ValidatorException("Failure");

        ValidationMessages messages = new ValidationMessagesImpl(field, Locale.ENGLISH);

        translator.parse(field, messages, text);
        translatorControl.setMatcher(new AlwaysMatcher());
        translatorControl.setThrowable(expected);

        replayControls();
View Full Code Here

TOP

Related Classes of org.apache.tapestry.form.translator.Translator

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.