Package com.eviware.soapui.model

Examples of com.eviware.soapui.model.TestPropertyHolder


      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 ) );
View Full Code Here


        public void actionPerformed( ActionEvent e )
        {

          String name;
          TestPropertyHolder sourceStep = ( TestPropertyHolder )sourceStepCombo.getSelectedItem();
          if( sourceStep == PropertyExpansionUtils.getGlobalProperties() )
            name = PropertyExpansion.GLOBAL_REFERENCE;
          else if( sourceStep == parent.getTestCase().getTestSuite().getProject() )
            name = PropertyExpansion.PROJECT_REFERENCE;
          else if( sourceStep == parent.getTestCase().getTestSuite() )
            name = PropertyExpansion.TESTSUITE_REFERENCE;
          else if( sourceStep == parent.getTestCase() )
            name = PropertyExpansion.TESTCASE_REFERENCE;
          else
            name = sourceStep.getModelItem().getName();

          badTransfer.setSourceStepName( name );

          badTransfer.setSourcePropertyName( ( String )propertiesCombo.getSelectedItem() );
View Full Code Here

        public void actionPerformed( ActionEvent e )
        {

          String name;
          TestPropertyHolder sourceStep = ( TestPropertyHolder )sourceStepCombo.getSelectedItem();
          if( sourceStep == PropertyExpansionUtils.getGlobalProperties() )
            name = PropertyExpansion.GLOBAL_REFERENCE;
          else if( sourceStep == parent.getTestCase().getTestSuite().getProject() )
            name = PropertyExpansion.PROJECT_REFERENCE;
          else if( sourceStep == parent.getTestCase().getTestSuite() )
            name = PropertyExpansion.TESTSUITE_REFERENCE;
          else if( sourceStep == parent.getTestCase() )
            name = PropertyExpansion.TESTCASE_REFERENCE;
          else
            name = sourceStep.getModelItem().getName();

          badTransfer.setTargetStepName( name );

          badTransfer.setTargetPropertyName( ( String )propertiesCombo.getSelectedItem() );
View Full Code Here

    WsdlTestCase testCase = null;
    WsdlTestSuite testSuite = null;
    WsdlProject project = null;
    WsdlMockService mockService = null;
    WsdlMockResponse mockResponse = null;
    TestPropertyHolder holder = 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 WsdlInterface )
    {
      project = ( ( WsdlInterface )modelItem ).getProject();
    }
    else if( modelItem instanceof WsdlProject )
    {
      project = ( WsdlProject )modelItem;
    }
    else if( modelItem instanceof WsdlMockService )
    {
      mockService = ( WsdlMockService )modelItem;
      project = mockService.getProject();
    }
    else if( modelItem instanceof AbstractHttpRequestInterface<?> )
    {
      project = ( ( AbstractHttpRequest<?> )modelItem ).getOperation().getInterface().getProject();
    }
    else if( modelItem instanceof WsdlMockOperation )
    {
      mockService = ( ( WsdlMockOperation )modelItem ).getMockService();
      project = mockService.getProject();
    }
    else if( modelItem instanceof WsdlMockResponse )
    {
      mockResponse = ( WsdlMockResponse )modelItem;
      mockService = mockResponse.getMockOperation().getMockService();
      project = mockService.getProject();
    }
    else if( modelItem instanceof SecurityTest )
    {
      securityTest = ( SecurityTest )modelItem;
      testCase = securityTest.getTestCase();
      testSuite = testCase.getTestSuite();
      project = testSuite.getProject();
    }

    // explicit item reference?
    if( pe.startsWith( PropertyExpansion.PROJECT_REFERENCE ) )
    {
      holder = project;
      pe = pe.substring( PropertyExpansion.PROJECT_REFERENCE.length() );
    }
    else if( pe.startsWith( PropertyExpansion.TESTSUITE_REFERENCE ) )
    {
      holder = testSuite;
      pe = pe.substring( PropertyExpansion.TESTSUITE_REFERENCE.length() );
    }
    else if( pe.startsWith( PropertyExpansion.TESTCASE_REFERENCE ) )
    {
      holder = testCase;
      pe = pe.substring( PropertyExpansion.TESTCASE_REFERENCE.length() );
    }
    else if( pe.startsWith( PropertyExpansion.SECURITYTEST_REFERENCE ) )
    {
      holder = testCase;
      pe = pe.substring( PropertyExpansion.SECURITYTEST_REFERENCE.length() );
    }
    else if( pe.startsWith( PropertyExpansion.MOCKSERVICE_REFERENCE ) )
    {
      holder = mockService;
      pe = pe.substring( PropertyExpansion.MOCKSERVICE_REFERENCE.length() );
    }
    else if( pe.startsWith( PropertyExpansion.MOCKRESPONSE_REFERENCE ) )
    {
      holder = mockResponse;
      pe = pe.substring( PropertyExpansion.MOCKRESPONSE_REFERENCE.length() );
    }
    else if( testCase != null )
    {
      int sepIx = pe.indexOf( PropertyExpansion.PROPERTY_SEPARATOR );
      if( sepIx > 0 )
      {
        holder = testCase.getTestStepByName( pe.substring( 0, sepIx ) );
        if( holder != null )
        {
          pe = pe.substring( sepIx + 1 );
        }
      }
    }

    int sepIx = pe.indexOf( PropertyExpansion.XPATH_SEPARATOR );
    String xpath = null;

    if( sepIx > 0 )
    {
      xpath = pe.substring( sepIx + 1 );
      pe = pe.substring( 0, sepIx );
    }

    if( holder == null )
      holder = getGlobalProperties();

    TestProperty tp = holder.getProperty( pe );
    return tp == null ? null : new MutablePropertyExpansionImpl( tp, xpath, target, propertyName );
  }
View Full Code Here

      return null;

    if( currentSourceProperty != null )
      return currentSourceProperty;

    TestPropertyHolder actualSourceStep = getSourceStep();
    return actualSourceStep == null ? null : actualSourceStep.getProperty( sourceType );
  }
View Full Code Here

      return null;

    if( currentSourceProperty != null )
      return currentSourceProperty.getName();

    TestPropertyHolder actualSourceStep = getSourceStep();
    if( actualSourceStep == null )
      return sourceType;

    TestProperty property = actualSourceStep.getProperty( sourceType );
    return property == null ? sourceType : property.getName();
  }
View Full Code Here

    // update
    sourceType = name;
    config.setSourceType( name );

    // update actual property
    TestPropertyHolder sourceStep2 = getSourceStep();
    currentSourceProperty = sourceStep2 != null && sourceType != null ? sourceStep2.getProperty( sourceType ) : null;

    // notify!
    propertyChangeSupport.firePropertyChange( SOURCE_TYPE_PROPERTY, old, name );
  }
View Full Code Here

      return null;

    if( currentTargetProperty != null )
      return currentTargetProperty;

    TestPropertyHolder actualTargetStep = getTargetStep();
    return actualTargetStep == null ? null : actualTargetStep.getProperty( targetType );
  }
View Full Code Here

      return null;

    if( currentTargetProperty != null )
      return currentTargetProperty.getName();

    TestPropertyHolder actualTargetStep = getTargetStep();
    TestProperty property = actualTargetStep == null ? null : actualTargetStep.getProperty( targetType );
    return actualTargetStep == null || property == null ? targetType : property.getName();
  }
View Full Code Here

    // update
    targetType = name;
    config.setTargetType( name );

    // update actual property
    TestPropertyHolder targetStep2 = getTargetStep();

    currentTargetProperty = targetStep2 != null && targetType != null ? targetStep2.getProperty( targetType ) : null;

    // notify!
    propertyChangeSupport.firePropertyChange( TARGET_TYPE_PROPERTY, old, name );
  }
View Full Code Here

TOP

Related Classes of com.eviware.soapui.model.TestPropertyHolder

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.