Package net.sourceforge.jaad.mp4.api

Examples of net.sourceforge.jaad.mp4.api.MetaData$Field


    @Test
    public void label_error_with_existing_class_attribute()
    {
        MarkupWriter writer = new MarkupWriterImpl(new XMLMarkupModel());
        Environment env = mockEnvironment();
        Field field = mockField();
        ValidationTracker tracker = mockValidationTracker();

        train_peekRequired(env, ValidationTracker.class, tracker);
        train_inError(tracker, field, true);
View Full Code Here


    @Test
    public void field_error()
    {
        MarkupWriter writer = new MarkupWriterImpl(new XMLMarkupModel());
        Environment env = mockEnvironment();
        Field field = mockField();
        ValidationTracker tracker = mockValidationTracker();

        train_peekRequired(env, ValidationTracker.class, tracker);
        train_inError(tracker, field, true);
View Full Code Here

    @Test
    public void field_ok()
    {
        Environment env = mockEnvironment();
        Field field = mockField();
        ValidationTracker tracker = mockValidationTracker();

        train_peekRequired(env, ValidationTracker.class, tracker);
        train_inError(tracker, field, false);
View Full Code Here

    @Test
    public void label_when_field_not_in_error()
    {
        Environment env = mockEnvironment();
        Field field = mockField();
        ValidationTracker tracker = mockValidationTracker();

        train_peekRequired(env, ValidationTracker.class, tracker);
        train_inError(tracker, field, false);
View Full Code Here

public class RequiredTest extends TapestryTestCase
{
    @Test
    public void null_value()
    {
        Field field = mockFieldWithLabel("My Field");
        MessageFormatter formatter = mockMessageFormatter();

        train_format(formatter, "{message}", "My Field");

        replay();
View Full Code Here

    @Test
    public void blank_value()
    {
        MessageFormatter formatter = mockMessageFormatter();
        Field field = mockFieldWithLabel("My Field");

        train_format(formatter, "{message}", "My Field");

        replay();
View Full Code Here

    @Test
    public void empty_collection_value()
    {
        MessageFormatter formatter = mockMessageFormatter();
        Field field = mockFieldWithLabel("My Field");

        train_format(formatter, "{message}", "My Field");

        replay();
View Full Code Here

    @Test
    public void not_empty_collection_value() throws Exception
    {
        MessageFormatter formatter = mockMessageFormatter();
        Field field = mockField();

        replay();

        new Required().validate(field, null, formatter, Arrays.asList("A", "B"));
View Full Code Here

    @Test
    public void non_blank_value() throws Exception
    {
        MessageFormatter formatter = mockMessageFormatter();
        Field field = mockField();

        replay();

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

        if (!Field.class.isInstance(fieldAsObject))
            throw new TapestryException(BindingsMessages.validateBindingForFieldsOnly(component),
                                        location, null);

        final Field field = (Field) fieldAsObject;

        return new InvariantBinding(location, FieldValidator.class, interner.intern(description + ": " + expression))
        {
            public Object get()
            {
View Full Code Here

TOP

Related Classes of net.sourceforge.jaad.mp4.api.MetaData$Field

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.