Package rocks.xmpp.extensions.data.model

Examples of rocks.xmpp.extensions.data.model.DataForm$Field


    }

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

        replay();

        Email validator = new Email(null);
View Full Code Here


public class RegexpTest extends InternalBaseTestCase
{
    @Test
    public void matching_pattern() throws Exception
    {
        Field field = mockField();
        MessageFormatter formatter = mockMessageFormatter();
        Pattern constraint = Pattern.compile("\\d{4}");

        replay();
View Full Code Here

    @Test
    public void input_mismatch() throws Exception
    {
        String label = "My Field";
        Field field = mockFieldWithLabel(label);
        MessageFormatter formatter = mockMessageFormatter();
        String message = "{message}";
        Pattern constraint = Pattern.compile("\\d{4}");
        String value = "abc";
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(null).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(null).validate(field, null, formatter, "not null");
View Full Code Here

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

        replay();
View Full Code Here

                "  </uri>\n" +
                "   </media>" +
                "  </field>\n" +
                "</x>\n";

        DataForm dataForm = unmarshal(xml, DataForm.class);

        Assert.assertNotNull(dataForm);
        Assert.assertEquals(dataForm.getType(), DataForm.Type.FORM);
        Media media = dataForm.getFields().get(0).getMedia();
        Assert.assertNotNull(media);
        Assert.assertEquals(media.getHeight(), 0);
        Assert.assertEquals(media.getWidth(), 0);
    }
View Full Code Here

TOP

Related Classes of rocks.xmpp.extensions.data.model.DataForm$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.