Examples of ApplicationStateManager


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

        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

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

    {
        InjectSpecification spec = newSpec("fred", "barney", null);
        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

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

        verifyControls();
    }

    public void testConfigure()
    {
        ApplicationStateManager manager = (ApplicationStateManager) newMock(ApplicationStateManager.class);

        InjectStateWorker delegate = (InjectStateWorker) newMock(InjectStateWorker.class);

        delegate.setApplicationStateManager(manager);
View Full Code Here

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

        verifyControls();
    }

    public void testConfigure()
    {
        ApplicationStateManager manager = (ApplicationStateManager) newMock(ApplicationStateManager.class);

        InjectStateWorker delegate = (InjectStateWorker) newMock(InjectStateWorker.class);

        delegate.setApplicationStateManager(manager);
View Full Code Here

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

        verifyControls();
    }

    public void testConfigure()
    {
        ApplicationStateManager manager = (ApplicationStateManager) newMock(ApplicationStateManager.class);

        InjectStateWorker delegate = (InjectStateWorker) newMock(InjectStateWorker.class);

        delegate.setApplicationStateManager(manager);
View Full Code Here

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

    {
        IComponentSpecification spec = newSpecification(newInjects("fred", "barney", null));
        MockControl opc = newControl(EnhancementOperation.class);
        EnhancementOperation op = (EnhancementOperation) opc.getMock();

        ApplicationStateManager asm = newASM();

        op.addField("_$applicationStateManager", ApplicationStateManager.class, asm);

        op.getPropertyType("fred");
        opc.setReturnValue(Map.class);
View Full Code Here

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

        MockControl opc = newControl(EnhancementOperation.class);
        EnhancementOperation op = (EnhancementOperation) opc.getMock();

        ErrorLog errorLog = (ErrorLog) newMock(ErrorLog.class);

        ApplicationStateManager asm = newASM();

        op.addField("_$applicationStateManager", ApplicationStateManager.class, asm);

        op.getPropertyType("fred");
        opc.setReturnValue(Map.class);
View Full Code Here

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

    public void testNoVisit()
    {
        IRequestCycle cycle = newCycle();
        IErrorProperty page = newPage();
        ApplicationStateManager manager = newApplicationStateManager();

        expect(manager.exists("visit")).andReturn(false);

        trainGetPage(cycle, "Home", page);

        page.setError("An error.");
View Full Code Here

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

    public void testLoggedOff()
    {
        IRequestCycle cycle = newCycle();
        IErrorProperty page = newPage();
        ApplicationStateManager manager = newApplicationStateManager();
        Visit visit = newVisit();

        expect(manager.exists("visit")).andReturn(true);

        expect(manager.get("visit")).andReturn(visit);

        expect(visit.isUserLoggedIn()).andReturn(false);

        trainGetPage(cycle, "Home", page);
View Full Code Here

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

    public void testLoggedIn()
    {
        IRequestCycle cycle = newCycle();
        IErrorProperty page = newPage();
        ApplicationStateManager manager = newApplicationStateManager();
        Visit visit = newVisit();

        expect(manager.exists("visit")).andReturn(true);

        expect(manager.get("visit")).andReturn(visit);

        expect(visit.isUserLoggedIn()).andReturn(true);

        trainGetPage(cycle, "MyLibrary", page);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.