Package org.ofbiz.entity.model

Examples of org.ofbiz.entity.model.ModelIndex$Field


    }

    @Test
    public void data_survives_serialization() throws Exception
    {
        Field fielda = newFieldWithControlName("fieldA");
        Field fieldb = newFieldWithControlName("fieldB");
        Field fieldc = newFieldWithControlName("fieldC");

        replay();

        ValidationTracker tracker = new ValidationTrackerImpl();
View Full Code Here


    }

    @Test
    public void clear_removes_all()
    {
        Field fielda = newFieldWithControlName("fieldA");
        Field fieldb = newFieldWithControlName("fieldB");

        replay();

        ValidationTracker tracker = new ValidationTrackerImpl();
View Full Code Here

        verify();
    }

    private final Field newFieldWithControlName(String controlName)
    {
        Field field = mockField();

        // Fields generated this way, for the purposes of this test, do not
        // ever change their controlName. In real life, elementNames can change.

        expect(field.getControlName()).andReturn(controlName).atLeastOnce();

        return field;
    }
View Full Code Here

public class AutofocusValidationDecoratorTest extends TapestryTestCase
{
    @Test
    public void field_is_disabled()
    {
        Field field = mockField();
        ValidationDecorator delegate = mockValidationDecorator();
        ValidationTracker tracker = mockValidationTracker();
        JavaScriptSupport jsSupport = mockJavaScriptSupport();

        delegate.insideField(field);
View Full Code Here

    }

    @Test
    public void field_is_in_error()
    {
        Field field = mockField();
        ValidationDecorator delegate = mockValidationDecorator();
        ValidationTracker tracker = mockValidationTracker();
        JavaScriptSupport jsSupport = mockJavaScriptSupport();

        delegate.insideField(field);
View Full Code Here

    }

    @Test
    public void field_is_required()
    {
        Field field = mockField();
        ValidationDecorator delegate = mockValidationDecorator();
        ValidationTracker tracker = mockValidationTracker();
        JavaScriptSupport jsSupport = mockJavaScriptSupport();

        delegate.insideField(field);
View Full Code Here

    }

    @Test
    public void field_is_optional()
    {
        Field field = mockField();
        ValidationDecorator delegate = mockValidationDecorator();
        ValidationTracker tracker = mockValidationTracker();
        JavaScriptSupport jsSupport = mockJavaScriptSupport();

        delegate.insideField(field);
View Full Code Here

    @Test
    public void label_error_no_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 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

TOP

Related Classes of org.ofbiz.entity.model.ModelIndex$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.