Package org.apache.tapestry.engine.state

Examples of org.apache.tapestry.engine.state.ApplicationStateManager


        Location l = newLocation();
        InjectSpecification spec = newSpec("fred", "barney", l);
       
        EnhancementOperation op = newMock(EnhancementOperation.class);

        ApplicationStateManager asm = newASM();

        expect(op.getPropertyType("fred")).andReturn(Map.class);

        op.claimProperty("fred");
        op.addField("_$fred", Map.class);
View Full Code Here


public class InjectStateFlagWorkerTest extends BaseEnhancementTestCase
{
    public void testNoExistingProperty()
    {
        Location l = newLocation();
        ApplicationStateManager asm = newApplicationStateManager();

        InjectSpecification is = new InjectSpecificationImpl();
        is.setProperty("fred");
        is.setObject("fredASO");
        is.setLocation(l);
View Full Code Here

    }

    public void testWithExistingProperty()
    {
        Location l = newLocation();
        ApplicationStateManager asm = newApplicationStateManager();

        InjectSpecification is = new InjectSpecificationImpl();
        is.setProperty("fred");
        is.setObject("fredASO");
        is.setLocation(l);
View Full Code Here

    }

    public void testWithExistingPropertyWrongType()
    {
        Location l = newLocation();
        ApplicationStateManager asm = newApplicationStateManager();

        InjectSpecification is = new InjectSpecificationImpl();
        is.setProperty("fred");
        is.setObject("fredASO");
        is.setLocation(l);
View Full Code Here

    }

    public void testSuccess()
    {
        MockControl asmc = newControl(ApplicationStateManager.class);
        ApplicationStateManager asm = (ApplicationStateManager) asmc.getMock();

        asm.exists("fred");
        asmc.setReturnValue(true);

        ValueConverter vc = newValueConverter();

        replayControls();
View Full Code Here

        Location l = fabricateLocation(22);

        Throwable t = new RuntimeException("Nested exception.");

        MockControl asmc = newControl(ApplicationStateManager.class);
        ApplicationStateManager asm = (ApplicationStateManager) asmc.getMock();

        asm.exists("fred");
        asmc.setThrowable(t);

        ValueConverter vc = newValueConverter();

        replayControls();
View Full Code Here

        return f.createBinding(null, "binding description", objectName, location);
    }

    public void testSuccess()
    {
        ApplicationStateManager asm = newMock(ApplicationStateManager.class);
       
        expect(asm.exists("fred")).andReturn(true);
       
        ValueConverter vc = newValueConverter();

        replay();
View Full Code Here

    public void testFailure()
    {
        Location l = fabricateLocation(22);

        Throwable t = new RuntimeException("Nested exception.");
        ApplicationStateManager asm = newMock(ApplicationStateManager.class);

        expect(asm.exists("fred")).andThrow(t);
       
        ValueConverter vc = newValueConverter();

        replay();
View Full Code Here

        Location l = newLocation();
        InjectSpecification spec = newSpec("fred", "barney", l);
        MockControl opc = newControl(EnhancementOperation.class);
        EnhancementOperation op = (EnhancementOperation) opc.getMock();

        ApplicationStateManager asm = newASM();

        op.getPropertyType("fred");
        opc.setReturnValue(Map.class);

        op.claimProperty("fred");
View Full Code Here

public class InjectStateFlagWorkerTest extends BaseEnhancementTestCase
{
    public void testNoExistingProperty()
    {
        Location l = newLocation();
        ApplicationStateManager asm = newApplicationStateManager();

        InjectSpecification is = new InjectSpecificationImpl();
        is.setProperty("fred");
        is.setObject("fredASO");
        is.setLocation(l);
View Full Code Here

TOP

Related Classes of org.apache.tapestry.engine.state.ApplicationStateManager

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.