Package com.eviware.soapui.impl.wsdl

Examples of com.eviware.soapui.impl.wsdl.WsdlTestSuite


        String name = UISupport.prompt("Specify name for moved TestSuite", "Move TestSuite", source.getName());
        if (name == null) {
            return false;
        }

        WsdlTestSuite testSuite = CloneTestSuiteAction.cloneToAnotherProject(source, target.getName(), name, true,
                source.getDescription());
        if (testSuite != null) {
            source.getProject().removeTestSuite(source);
            return true;
        }
View Full Code Here


        return true;
    }

    @Override
    boolean copyAfter(WsdlTestCase testCase, WsdlProject target) {
        WsdlTestSuite testSuite = getTargetTestSuite(target, "Copy TestCase");
        if (testSuite == null) {
            return false;
        }

        testCase = TestCaseToTestSuiteDropHandler.copyTestCase(testCase, testSuite, -1);
View Full Code Here

            if (name == null) {
                return null;
            }
        }

        WsdlTestSuite testSuite = target.getTestSuiteByName(name);
        if (testSuite == null) {
            name = UISupport.prompt("Specify name for new TestSuite", title, "TestSuite "
                    + (target.getTestSuiteCount() + 1));
            if (name == null) {
                return null;
            }

            testSuite = target.addNewTestSuite(name);
        }

        Set<Interface> requiredInterfaces = new HashSet<Interface>();

        for (int i = 0; i < testSuite.getTestCaseCount(); i++) {
            WsdlTestCase testCase = testSuite.getTestCaseAt(i);

            for (int y = 0; y < testCase.getTestStepCount(); y++) {
                WsdlTestStep testStep = testCase.getTestStepAt(y);
                requiredInterfaces.addAll(testStep.getRequiredInterfaces());
            }
View Full Code Here

        }
    }

    @Override
    boolean moveAfter(WsdlTestCase testCase, WsdlProject target) {
        WsdlTestSuite testSuite = getTargetTestSuite(target, "Move TestCase");
        if (testSuite == null) {
            return false;
        }

        testCase = TestCaseToTestSuiteDropHandler.moveTestCase(testCase, testSuite, -1);
View Full Code Here

        return source != target;
    }

    @Override
    boolean copyAfter(WsdlTestSuite source, WsdlTestSuite target) {
        WsdlTestSuite testCase = copyTestSuite(source, target.getProject(),
                target.getProject().getIndexOfTestSuite(target) + 1);

        if (testCase != null) {
            UISupport.select(testCase);
        }
View Full Code Here

        return testCase != null;
    }

    @Override
    boolean moveAfter(WsdlTestSuite source, WsdlTestSuite target) {
        WsdlTestSuite testCase = moveTestSuite(source, target.getProject(),
                target.getProject().getIndexOfTestSuite(target) + 1);

        if (testCase != null) {
            UISupport.select(testCase);
        }
View Full Code Here

        return source != target;
    }

    @Override
    boolean copyBefore(WsdlTestSuite source, WsdlTestSuite target) {
        WsdlTestSuite testCase = copyTestSuite(source, source.getProject(),
                target.getProject().getIndexOfTestSuite(target));

        if (testCase != null) {
            UISupport.select(testCase);
        }
View Full Code Here

        return getMoveAfterInfo(source, target);
    }

    @Override
    boolean moveBefore(WsdlTestSuite source, WsdlTestSuite target) {
        WsdlTestSuite testCase = moveTestSuite(source, target.getProject(),
                target.getProject().getIndexOfTestSuite(target));

        if (testCase != null) {
            UISupport.select(testCase);
        }
View Full Code Here

                    requiredInterfaces.addAll(testStep.getRequiredInterfaces());
                }
            }

            if (DragAndDropSupport.importRequiredInterfaces(target, requiredInterfaces, "Move TestSuite")) {
                WsdlTestSuite importedTestSuite = target.importTestSuite(testSuite, testSuite.getName(), position, true,
                        null);
                if (importedTestSuite != null) {
                    testSuite.getProject().removeTestSuite(testSuite);
                    return importedTestSuite;
                }
View Full Code Here

        // create transfer menus
        targetMenu.removeAll();

        WsdlTestStep testStep;
        WsdlTestCase testCase = null;
        WsdlTestSuite testSuite = null;
        WsdlProject project = null;
        MockService mockService = null;
        MockResponse mockResponse = null;
        SecurityTest securityTest = null;

        if (modelItem instanceof WsdlTestStep) {
            testStep = (WsdlTestStep) modelItem;
            testCase = testStep.getTestCase();
            testSuite = testCase.getTestSuite();
            project = testSuite.getProject();
        } else if (modelItem instanceof WsdlTestCase) {
            testCase = (WsdlTestCase) modelItem;
            testSuite = testCase.getTestSuite();
            project = testSuite.getProject();
        } else if (modelItem instanceof WsdlTestSuite) {
            testSuite = (WsdlTestSuite) modelItem;
            project = testSuite.getProject();
        } else if (modelItem instanceof WsdlMockService) {
            project = ((WsdlMockService) modelItem).getProject();
        } else if (modelItem instanceof MockResponse) {
            mockResponse = (MockResponse) modelItem;
            mockService = (mockResponse).getMockOperation().getMockService();
            project = mockService.getProject();
        } else if (modelItem instanceof WsdlProject) {
            project = (WsdlProject) modelItem;
        } else if (modelItem instanceof AbstractHttpRequestInterface<?>) {
            project = ((AbstractHttpRequest<?>) modelItem).getOperation().getInterface().getProject();
        } else if (modelItem instanceof Operation) {
            project = (WsdlProject) ((Operation) modelItem).getInterface().getProject();
        } else if (modelItem instanceof SecurityTest) {
            securityTest = (SecurityTest) modelItem;
            testCase = securityTest.getTestCase();
            testSuite = testCase.getTestSuite();
            project = testSuite.getProject();
        }

        TestPropertyHolder globalProperties = PropertyExpansionUtils.getGlobalProperties();
        if (globalProperties.getProperties().size() > 0) {
            targetMenu.add(createPropertyMenu("Global", globalProperties));
        }

        if (project != null) {
            targetMenu.add(createPropertyMenu("Project: [" + project.getName() + "]", project));
        }

        if (testSuite != null) {
            targetMenu.add(createPropertyMenu("TestSuite: [" + testSuite.getName() + "]", testSuite));
        }

        if (mockService != null) {
            targetMenu.add(createPropertyMenu("MockService: [" + mockService.getName() + "]", mockService));
        }
View Full Code Here

TOP

Related Classes of com.eviware.soapui.impl.wsdl.WsdlTestSuite

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.