Package com.adito.testcontainer

Examples of com.adito.testcontainer.StrutsExecutionStep


        try {
            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


        T resourceOne = createResource(toCreateOne);
        T resourceTwo = createResource(toCreateTwo);

        try {
            performActionVerifyTiles("unspecified");
            StrutsExecutionStep executionStep = new StrutsExecutionStep(getRequestPath(), "display", getForwardPath());
            executionStep.addRequestParameter("actionTarget", "filter");
            executionStep.addRequestParameter("filterText", "XYZ*");
            executeStep(executionStep);
           
            AbstractResourcesForm<R> resourcesForm = (AbstractResourcesForm<R>) getActionForm();
            int filteredRowCount = resourcesForm.getPager().getFilteredRowCount();
            assertEquals("Should have 2 row(s)", 2, filteredRowCount);
View Full Code Here

        T resourceOne = createResource(toCreateOne);
        T resourceTwo = createResource(toCreateTwo);

        try {
            performActionVerifyTiles("unspecified");
            StrutsExecutionStep executionStep = new StrutsExecutionStep(getRequestPath(), "display", getForwardPath());
            executionStep.addRequestParameter("actionTarget", "filter");
            executionStep.addRequestParameter("filterText", "XYZ*");
            executeStep(executionStep);

            AbstractResourcesForm<R> resourcesForm = (AbstractResourcesForm<R>) getActionForm();
            int filteredRowCount = resourcesForm.getPager().getFilteredRowCount();
            assertEquals("Should have 2 row(s)", 2, filteredRowCount);
View Full Code Here

        T resourceOne = createResource(toCreateOne);
        T resourceTwo = createResource(toCreateTwo);

        try {
            performActionVerifyTiles("unspecified");
            StrutsExecutionStep executionStep = new StrutsExecutionStep(getRequestPath(), "display", getForwardPath());
            executionStep.addRequestParameter("actionTarget", "filter");
            executionStep.addRequestParameter("filterText", "*XYZ*");
            executeStep(executionStep);

            AbstractResourcesForm<R> resourcesForm = (AbstractResourcesForm<R>) getActionForm();
            int filteredRowCount = resourcesForm.getPager().getFilteredRowCount();
            assertEquals("Should have 2 row(s)", 2, filteredRowCount);
View Full Code Here

        T resourceOne = createResource(toCreateOne);
        T resourceTwo = createResource(toCreateTwo);

        try {
            performActionVerifyTiles("unspecified");
            StrutsExecutionStep executionStep = new StrutsExecutionStep(getRequestPath(), "display", getForwardPath());
            executionStep.addRequestParameter("actionTarget", "filter");
            executionStep.addRequestParameter("filterText", "XYZ*");
            executeStep(executionStep);

            AbstractResourcesForm<R> resourcesForm = (AbstractResourcesForm<R>) getActionForm();
            int filteredRowCount = resourcesForm.getPager().getFilteredRowCount();
            assertEquals("Should have 1 row", 1, filteredRowCount);
View Full Code Here

        T resourceOne = createResource(toCreateOne);
        Collection<T> resources = createResourceBatch("Unique resource name", 15);

        try {
            performActionVerifyTiles("unspecified");
            StrutsExecutionStep executionStep = new StrutsExecutionStep(getRequestPath(), "display", getForwardPath());
            executionStep.addRequestParameter("actionTarget", "filter");
            executionStep.addRequestParameter("filterText", "XYZ*");
            executeStep(executionStep);

            AbstractResourcesForm<R> resourcesForm = (AbstractResourcesForm<R>) getActionForm();
            Pager pager = resourcesForm.getPager();
            int filteredRowCount = pager.getFilteredRowCount();
View Full Code Here

        }
        fail("resource was not found in model");
    }

    protected final void performFailedAction(String actionTarget, String selectedResource) {
        StrutsExecutionStep executionStep = new StrutsExecutionStep(getRequestPath(), "", "/showException", false);
        executionStep.addRequestParameter("actionTarget", actionTarget);
        executionStep.addRequestParameter("selectedResource", selectedResource);
        executeStep(executionStep);
    }
View Full Code Here

     *
     * @param actionTarget
     * @param selectedResource
     */
    protected final void performRedirectAction(String actionTarget, String selectedResource) {
        StrutsExecutionStep executionStep = new StrutsExecutionStep(getRequestPath(), getForwardPath());
        executionStep.addRequestParameter("actionTarget", actionTarget);
        executionStep.addRequestParameter("selectedResource", selectedResource);
        executeStep(executionStep);
    }
View Full Code Here

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

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

        T resource = executeCloneRedirect();

        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

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.