Package com.adito.testcontainer

Examples of com.adito.testcontainer.StrutsExecutionStep.addMessage()


        T resource = createResource();

        StrutsExecutionStep executionStep = new StrutsExecutionStep(getRequestPath(), getRequestPath());
        executionStep.addRequestParameter("actionTarget", "remove");
        executionStep.addRequestParameter("selectedResource", String.valueOf(resource.getResourceId()));
        executionStep.addMessage(getRemovedMessage());
        executeStep(executionStep);
       
        Collection<T> resources = getResources();
        assertEquals("Should be zero resources", getInitialResourceCount(), resources.size());
    }
View Full Code Here


            AccessRightsForm resourceForm = (AccessRightsForm) getActionForm();
            updateInvalidResourceProperties(resourceForm);

            StrutsExecutionStep executionStep = new StrutsExecutionStep(getRequestPath(), getInitialRequestPath());
            executionStep.addRequestParameter("actionTarget", "commit");
            executionStep.addMessage(getSavedMessage());
            executeStep(executionStep);
           
            AccessRights byId = getResourceById(resource.getResourceId());
            assertEquals(resourceForm.getResource(), byId);
            assertNotSame("Invalid permission added should not match", resource.getAccessRights(), byId.getAccessRights());
View Full Code Here

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

            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

            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

        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

            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

    }

    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);
    }
   
    protected final void performActionAndVerifyTiles(String actionTarget) {
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.