Package org.apache.tapestry.coerce

Examples of org.apache.tapestry.coerce.ValueConverter


        ExpressionCache ec = (ExpressionCache) ecc.getMock();

        IComponent component = newComponent();
        Object compiled = new Object();

        ValueConverter vc = newValueConverter();

        ec.getCompiledExpression("exp");
        ecc.setReturnValue(compiled);

        ev.isConstant("exp");
View Full Code Here


        cc.setReturnValue(lm);

        lm.getListener("foo");
        lmc.setReturnValue(listener);

        ValueConverter vc = newValueConverter();

        replayControls();

        ListenerMethodBinding b = new ListenerMethodBinding(component, "foo", "param", vc,
                fabricateLocation(33));
View Full Code Here

        InjectedValueProvider provider = (InjectedValueProvider) control.getMock();

        provider.obtainValue("spring:bean", l);
        control.setReturnValue(injectedValue);

        ValueConverter converter = newValueConverter();

        replayControls();

        IBinding binding = newBinding(converter, provider, "spring:bean", l);
View Full Code Here

        IComponent component = (IComponent) cc.getMock();

        component.getComponent("foo");
        cc.setReturnValue(nested);

        ValueConverter vc = newValueConverter();

        replayControls();

        ComponentBinding b = new ComponentBinding("param", vc, fabricateLocation(2), component,
                "foo");
View Full Code Here

public class TestLiteralBinding extends BindingTestCase
{
    public void testGetObject()
    {
        Location l = fabricateLocation(22);
        ValueConverter vc = newValueConverter();

        replayControls();

        LiteralBinding b = new LiteralBinding("parameter foo", vc, l, "literal-value");
View Full Code Here

    }

    public void testToString()
    {
        Location l = fabricateLocation(22);
        ValueConverter vc = newValueConverter();

        replayControls();

        LiteralBinding b = new LiteralBinding("parameter foo", vc, l, "literal-value");
View Full Code Here

    }

    public void testGetObjectWithClass()
    {
        MockControl control = newControl(ValueConverter.class);
        ValueConverter vc = (ValueConverter) control.getMock();

        Date date = new Date();

        vc.coerceValue("my-literal", Date.class);
        control.setReturnValue(date);

        replayControls();

        LiteralBinding b = new LiteralBinding("parameter foo", vc, fabricateLocation(99),
View Full Code Here

    }

    public void testGetObjectException()
    {
        MockControl control = newControl(ValueConverter.class);
        ValueConverter vc = (ValueConverter) control.getMock();

        Exception innerException = new RuntimeException("Failure");

        vc.coerceValue("my-literal", Date.class);
        control.setThrowable(innerException);

        replayControls();

        Location location = fabricateLocation(99);
View Full Code Here

    }

    public void testSetObject()
    {
        Location l = fabricateLocation(22);
        ValueConverter vc = newValueConverter();

        replayControls();

        LiteralBinding b = new LiteralBinding("parameter foo", vc, l, "literal-value");
View Full Code Here

{

    public void testCreate()
    {
        IComponent component = (IComponent) newMock(IComponent.class);
        ValueConverter vc = newValueConverter();

        replayControls();

        MessageBinding b = new MessageBinding("param", vc, fabricateLocation(12), component, "key");
View Full Code Here

TOP

Related Classes of org.apache.tapestry.coerce.ValueConverter

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.