Package com.eviware.soapui.model.testsuite

Examples of com.eviware.soapui.model.testsuite.TestProperty


      return result.toStringArray();
    }

    public String getPropertyValue( String name )
    {
      TestProperty property = getProperty( name );
      return property == null ? null : property.getValue();
    }
View Full Code Here


        String value = PropertyExpansionUtils.getGlobalProperty( name );
        if( value != null )
          return value;
      }

      TestProperty property = holder.getProperty( name );

      if( property != null )
      {
        return context == null ? ResolverUtils.extractXPathPropertyValue( property, xpath ) : ResolverUtils
            .extractXPathPropertyValue( property, PropertyExpander.expandProperties( context, xpath ) );
      }
    }
    else
    {
      if( globalOverride )
      {
        String value = PropertyExpansionUtils.getGlobalProperty( name );
        if( value != null )
          return value;
      }

      TestProperty property = holder.getProperty( name );
      if( property != null )
      {
        return property.getValue();
      }
    }

    return null;
  }
View Full Code Here

    }

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

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

    if( parameter == null )
      return;

    String name = parameter.getName();
    String xpath = parameter.getXpath();
    TestProperty tp = getTestStep().getProperty( name );
    XmlObjectTreeModel xmlObjectTreeModel = null;
    if( tp.getSchemaType() != null && XmlUtils.seemsToBeXml( tp.getValue() ) )
    {
      try
      {
        // xmlObjectTreeModel = new XmlObjectTreeModel(
        // tp.getSchemaType().getTypeSystem(),
        // XmlObject.Factory.parse( tp.getValue() ) );
        xmlObjectTreeModel = new XmlObjectTreeModel( tp.getSchemaType().getTypeSystem(),
            XmlUtils.createXmlObject( tp.getValue() ) );
      }
      catch( XmlException e )
      {
        SoapUI.logError( e );
      }
View Full Code Here

    for( SecurityCheckedParameter parameter : getParameterHolder().getParameterList() )
    {

      if( parameter.isChecked() )
      {
        TestProperty property = getTestStep().getProperties().get( parameter.getName() );
        // no xpath, just put invalid type value in parameter value
        if( parameter.getXpath() == null || parameter.getXpath().trim().length() == 0 )
        {
          for( SchemaTypeForSecurityScanConfig invalidType : invalidTypeConfig.getTypesListList() )
          {

            if( !parameterMutations.containsKey( parameter ) )
              parameterMutations.put( parameter, new ArrayList<String>() );
            parameterMutations.get( parameter ).add( invalidType.getValue() );

          }
        }
        else
        {
          // we have xpath but do we have xml which need to mutate
          // ignore if there is no value, since than we'll get exception
          if( property.getValue() == null && property.getDefaultValue() == null )
            continue;
          // get value of that property
          String value = context.expand( property.getValue() );

          if( XmlUtils.seemsToBeXml( value ) )
          {

            // XmlObjectTreeModel model = new XmlObjectTreeModel(
            // property.getSchemaType().getTypeSystem(),
            // XmlObject.Factory.parse( value ) );
            XmlObjectTreeModel model = new XmlObjectTreeModel( property.getSchemaType().getTypeSystem(),
                XmlUtils.createXmlObject( value ) );

            XmlTreeNode[] nodes = model.selectTreeNodes( context.expand( parameter.getXpath() ) );

            // for each invalid type set all nodes
View Full Code Here

    {
      return;
    }
    String name = parameter.getName();
    String xpath = parameter.getXpath();
    TestProperty tp = getTestStep().getProperty( name );
    XmlObjectTreeModel xmlObjectTreeModel = null;
    if( tp.getSchemaType() != null && XmlUtils.seemsToBeXml( tp.getValue() ) )
    {
      try
      {
        // xmlObjectTreeModel = new XmlObjectTreeModel(
        // tp.getSchemaType().getTypeSystem(),
        // XmlObject.Factory.parse( tp.getValue() ) );
        xmlObjectTreeModel = new XmlObjectTreeModel( tp.getSchemaType().getTypeSystem(),
            XmlUtils.createXmlObject( tp.getValue() ) );
      }
      catch( XmlException e )
      {
        SoapUI.logError( e );
      }
View Full Code Here

  public String getPropertyValue( String name )
  {
    if( properties == null )
      return null;

    TestProperty testStepProperty = properties.get( getPropertyKeyName( name ) );
    return testStepProperty == null ? null : testStepProperty.getValue();
  }
View Full Code Here

  public void setPropertyValue( String name, String value )
  {
    if( properties == null )
      return;

    TestProperty testStepProperty = properties.get( getPropertyKeyName( name ) );
    if( testStepProperty != null )
    {
      testStepProperty.setValue( value );
    }
  }
View Full Code Here

  protected TestProperty deleteProperty( String name, boolean notify )
  {
    if( properties != null )
    {
      name = getPropertyKeyName( name );
      TestProperty result = properties.remove( name );

      if( result != null )
      {
        normalizedPropertyNames.get( name.toUpperCase() ).remove( name );
        propertyList.remove( result );
View Full Code Here

      return;

    oldName = getPropertyKeyName( oldName );
    String upper = oldName.toUpperCase();

    TestProperty testStepProperty = properties.get( oldName );
    if( testStepProperty == null )
      return;

    Set<String> props = normalizedPropertyNames.get( upper );
    properties.remove( oldName );
    props.remove( oldName );
    String newName = testStepProperty.getName();
    properties.put( newName, testStepProperty );

    upper = newName.toUpperCase();
    if( !normalizedPropertyNames.containsKey( upper ) )
      normalizedPropertyNames.put( upper, new HashSet<String>() );
View Full Code Here

TOP

Related Classes of com.eviware.soapui.model.testsuite.TestProperty

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.