Package org.apache.tapestry

Examples of org.apache.tapestry.Field


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

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

        replay();
View Full Code Here


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

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

        replay();
View Full Code Here

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

        replay();

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

public class MinTest extends InternalBaseTestCase
{
    @Test
    public void large_enough() throws Exception
    {
        Field field = newField();
        MessageFormatter formatter = newMessageFormatter();
        Long constraint = 50l;

        replay();
View Full Code Here

    @Test
    public void value_too_small() throws Exception
    {
        String label = "My Field";
        Field field = newFieldWithLabel(label);
        MessageFormatter formatter = newMessageFormatter();
        String message = "{message}";
        Long constraint = 100l;
        Number value = 99;
View Full Code Here

{

    @Test
    public void long_enough() throws Exception
    {
        Field field = newField();
        MessageFormatter formatter = newMessageFormatter();
        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 = newFieldWithLabel(label);
        MessageFormatter formatter = newMessageFormatter();
        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 = newField();
        MessageFormatter formatter = newMessageFormatter();
        Long constraint = 50l;

        replay();
View Full Code Here

    @Test
    public void value_too_large() throws Exception
    {
        String label = "My Field";
        Field field = newFieldWithLabel(label);
        MessageFormatter formatter = newMessageFormatter();
        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 = newField();
        MessageFormatter formatter = newMessageFormatter();
        String value = "Now the student has become the master.";

        replay();
View Full Code Here

TOP

Related Classes of org.apache.tapestry.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.