Package org.auraframework.instance

Examples of org.auraframework.instance.Action.run()


        params.put("section", section);
        params.put("name", name);

        Action instance = (Action) Aura.getInstanceService().getInstance(getLabelDesc,
                ActionDef.class, params);
        instance.run();
        assertEquals(expectedStatus, instance.getState());
        assertEquals(expectedLabel, instance.getReturnValue());

        return instance;
    }
View Full Code Here


    }

    private void checkPassAction(ControllerDef controller, String name, Map<String, Object> args, State expState,
            Object returnValue) throws DefinitionNotFoundException {
        Action action = controller.createAction(name, args);
        action.run();
        assertEquals(name + " State", expState, action.getState());
        assertEquals(name + " expected no errors", 0, action.getErrors().size());
        assertEquals(name + " return", returnValue, action.getReturnValue());
    }
View Full Code Here

    }

    private void checkFailAction(ControllerDef controller, String name, Map<String, Object> args, State expState,
            Class<? extends Exception> error, String errorMessage) throws DefinitionNotFoundException {
        Action action = controller.createAction(name, args);
        action.run();
        assertEquals(name + " State", expState, action.getState());
        assertEquals(name + " expected an error", 1, action.getErrors().size());
        checkExceptionContains((Exception) action.getErrors().get(0), error, errorMessage);
        assertEquals(name + " return", null, action.getReturnValue());
    }
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.