Package com.eviware.soapui.impl.wsdl.teststeps

Examples of com.eviware.soapui.impl.wsdl.teststeps.WsdlTestStep


    @Override
    public void popupMenuWillBecomeVisible(PopupMenuEvent arg0) {
        // 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));
        }

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

        if (testCase != null) {
            targetMenu.add(createPropertyMenu("TestCase: [" + testCase.getName() + "]", testCase));

            for (int c = 0; c < testCase.getTestStepCount(); c++) {
                testStep = testCase.getTestStepAt(c);
                if (testStep.getPropertyNames().length == 0) {
                    continue;
                }

                if (targetMenu.getComponentCount() == 3) {
                    targetMenu.add(new JSeparator());
                }

                targetMenu.add(createPropertyMenu("Step " + (c + 1) + ": [" + testStep.getName() + "]", testStep));
            }
        }

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


  /* (non-Javadoc)
   * @see com.eviware.soapui.impl.wsdl.teststeps.registry.WsdlTestStepFactory#buildTestStep(com.eviware.soapui.impl.wsdl.testcase.WsdlTestCase, com.eviware.soapui.config.TestStepConfig, boolean)
   */
  @Override
  public WsdlTestStep buildTestStep(WsdlTestCase testCase, TestStepConfig config, boolean forLoadTest) {
    WsdlTestStep newStep = new ExpressionEvaluationTestStep(testCase, config, forLoadTest);
    newStep.setIcon(new ImageIcon(getClass().getResource(ICON_FILENAME)));
    return newStep;
  }
View Full Code Here

    for (TestSuite testSuite : target.getProject().getTestSuiteList()) {
      for (TestCase testCase : testSuite.getTestCaseList()) {
        int testStepCount = testCase.getTestStepCount();
        for (int c = 0; c < testStepCount; c++) {
          WsdlTestStep testStep = (WsdlTestStep) testCase.getTestStepAt(c);
          if (typeAndOperationMatch(testStep, target)) {
            result.add(testStep);
          }
        }
      }
View Full Code Here

    config.setName("Math Evaluator");
    config.setType("expreval");
    XmlObject xmlObject = config.addNewConfig();
    xmlObject.set(XmlObject.Factory.parse("<xml-fragment xmlns:con=\"http://eviware.com/soapui/config\"><expression>5 + 5</expression><precision>4</precision><usePadding>true</usePadding></xml-fragment>"));
   
    WsdlTestStep constructedTestStep = factory.buildTestStep(testCase, config, false);
    assertTrue("Test step must be of type ExpressionEvaluationTestStep", constructedTestStep instanceof ExpressionEvaluationTestStep);
   
    ExpressionEvaluationTestStep step = (ExpressionEvaluationTestStep) constructedTestStep;
    assertEquals("Math Evaluator", step.getName());
    assertEquals("5 + 5", step.getExpression());
View Full Code Here

TOP

Related Classes of com.eviware.soapui.impl.wsdl.teststeps.WsdlTestStep

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.