Package com.adito.testcontainer

Examples of com.adito.testcontainer.StrutsExecutionStep


       
        try {
            AbstractResourceForm<T> resourceForm = (AbstractResourceForm<T>) getActionForm();
            updateProperties(resourceForm);
           
            StrutsExecutionStep executionStep = new StrutsExecutionStep(getRequestPath(), getInitialRequestPath());
            executionStep.addRequestParameter("actionTarget", "commit");
            executionStep.addMessage(getSavedMessage());
            executeStep(executionStep);

            T formResource = resourceForm.getResource();
            T byId = getResourceById(formResource.getResourceId());
            assertEquals(formResource, byId);
View Full Code Here


    }

    /**
     */
    public void testCreateResourceNotImplemented() {
        StrutsExecutionStep executionStep = new StrutsExecutionStep(getRequestPath(), "", getActualForward(), false);
        executionStep.addRequestParameter("actionTarget", "create");
        executeStep(executionStep);
    }
View Full Code Here

    protected final void createResourceWithCommit() throws Exception {
        AbstractResourceForm<T> resourceForm = (AbstractResourceForm<T>) getActionForm();
        resourceForm.setResourceName("newResourceName");
        updateProperties(resourceForm);

        StrutsExecutionStep executionStep = new StrutsExecutionStep(getRequestPath(), getInitialRequestPath());
        executionStep.addRequestParameter("actionTarget", "commit");
        executionStep.addMessage(getSavedMessage());
        executeStep(executionStep);
       
        Collection<T> resources = getResources();
        assertEquals("Should be one resource", getInitialResourceCount() + 1, resources.size());
View Full Code Here

        try {
            AbstractResourceForm<T> resourceForm = (AbstractResourceForm<T>) getActionForm();
            updateProperties(resourceForm);

            StrutsExecutionStep executionStep = new StrutsExecutionStep(getRequestPath(), getInitialRequestPath());
            executionStep.addRequestParameter("actionTarget", "commit");
            executionStep.addMessage(getSavedMessage());
            executeStep(executionStep);
           
            T byId = getResourceById(resource.getResourceId());
            assertEquals(resourceForm.getResource(), byId);
        } finally {
View Full Code Here

        ActionForm actionForm = getActionForm();
        assertTrue("Should be of type " + getActionFormClass().getName(), actionForm.getClass().isAssignableFrom(getActionFormClass()));
    }

    protected final void testValidationFailure(String errorMessage) {
        StrutsExecutionStep executionStep = new StrutsExecutionStep(requestPath, "display", getForwardPath());
        executionStep.addRequestParameter("actionTarget", "commit");
        executionStep.addMessage("info.requiredFieldIndicator");
        executionStep.addError(errorMessage);
        executeStep(executionStep);
    }
View Full Code Here

    protected final void performActionAndVerifyTiles(String actionTarget) {
        performActionAndVerifyTiles(getRequestPath(), actionTarget, getForwardPath());
    }

    protected final void performActionAndVerifyTiles(String requestPath, String actionTarget, String forwardPath) {
        StrutsExecutionStep executionStep = new StrutsExecutionStep(requestPath, "display", forwardPath);
        executionStep.addRequestParameter("actionTarget", actionTarget);
        executeStep(executionStep);
    }
View Full Code Here

        executionStep.addRequestParameter("actionTarget", actionTarget);
        executeStep(executionStep);
    }

    protected final void performActionAndVerifyPath(String requestPath, String actionTarget, String forwardPath) {
        StrutsExecutionStep executionStep = new StrutsExecutionStep(requestPath, forwardPath);
        executionStep.addRequestParameter("actionTarget", actionTarget);
        executeStep(executionStep);
    }
View Full Code Here

TOP

Related Classes of com.adito.testcontainer.StrutsExecutionStep

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.