Package com.squareup.protoparser

Examples of com.squareup.protoparser.MessageType$Field


{

    @Test
    public void long_enough() throws Exception
    {
        Field field = mockField();
        MessageFormatter formatter = mockMessageFormatter();
        String value = "Now the student has become the master.";

        replay();
View Full Code Here


    @Test
    public void short_value() throws Exception
    {
        String label = "My Field";
        Field field = mockFieldWithLabel(label);
        MessageFormatter formatter = mockMessageFormatter();
        String value = "Now the student has become the master.";
        String message = "{message}";
        Integer constraint = value.length() + 1;
View Full Code Here

public class MaxTest extends InternalBaseTestCase
{
    @Test
    public void small_enough() throws Exception
    {
        Field field = mockField();
        MessageFormatter formatter = mockMessageFormatter();
        Long constraint = 50L;

        replay();
View Full Code Here

    @Test
    public void value_too_large() throws Exception
    {
        String label = "My Field";
        Field field = mockFieldWithLabel(label);
        MessageFormatter formatter = mockMessageFormatter();
        String message = "{message}";
        Long constraint = 100l;
        Number value = 101;
View Full Code Here

public class MaxLengthTest extends InternalBaseTestCase
{
    @Test
    public void short_enough() throws Exception
    {
        Field field = mockField();
        MessageFormatter formatter = mockMessageFormatter();
        String value = "Now the student has become the master.";

        replay();
View Full Code Here

    @Test
    public void long_value() throws Exception
    {
        String label = "My Field";
        Field field = mockFieldWithLabel(label);
        MessageFormatter formatter = mockMessageFormatter();
        String value = "Now the student has become the master.";
        String message = "{message}";
        Integer constraint = value.length() - 1;
View Full Code Here

        if (!Field.class.isInstance(fieldAsObject))
            throw new TapestryException(String.format("Component '%s' is not a field (it does not implement the Field interface) and may not be used with the validate: binding prefix.", component.getCompleteId()),
                                        location, null);

        final Field field = (Field) fieldAsObject;

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

    }

    @Test
    public void add_validation_when_client_validation_is_disabled()
    {
        Field barney = mockField();
        ClientBehaviorSupport clientBehaviorSupport = mockClientBehaviorSupport();

        replay();

        FormSupportImpl support = new FormSupportImpl(null, null, null, false, null,
View Full Code Here

    }

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

        replay();

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

    }

    @Test
    public void record_input()
    {
        Field field = newFieldWithControlName("field");

        replay();

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

TOP

Related Classes of com.squareup.protoparser.MessageType$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.