Package com.eviware.soapui.model.support

Examples of com.eviware.soapui.model.support.TestStepBeanProperty


      {
        return getLastResult() == null ? null : getLastResult().getResult();
      }
    }, this ) );

    addProperty( new TestStepBeanProperty( "ExpectedResult", false, this, "expectedResult", this ) );
  }
View Full Code Here


    {
      addProperty( new RestTestStepProperty( ( RestParamProperty )property ) );
    }

    // init default properties
    addProperty( new TestStepBeanProperty( "Endpoint", false, testRequest, "endpoint", this, false ) );
    addProperty( new TestStepBeanProperty( "Username", false, testRequest, "username", this, true ) );
    addProperty( new TestStepBeanProperty( "Password", false, testRequest, "password", this, true ) );
    addProperty( new TestStepBeanProperty( "Domain", false, testRequest, "domain", this, false ) );

    // init properties
    addProperty( new TestStepBeanProperty( "Request", false, testRequest, "requestContent", this, true )
    {
      @Override
      public String getDefaultValue()
      {
        return createDefaultRequestContent();
      }
    } );

    addProperty( new TestStepBeanProperty( WsdlTestStepWithProperties.RESPONSE_AS_XML, true, testRequest,
        "responseContentAsXml", this )
    {
      @Override
      public String getDefaultValue()
      {
        return createDefaultResponseXmlContent();
      }
    } );

    addProperty( new TestStepBeanProperty( "Response", true, testRequest, "responseContentAsString", this )
    {
      @Override
      public String getDefaultValue()
      {
        return createDefaultRawResponseContent();
View Full Code Here

      }
  }

  private void addResponseAsXmlVirtualProperty()
  {
    TestStepBeanProperty responseProperty = new TestStepBeanProperty( WsdlTestStepWithProperties.RESPONSE_AS_XML,
        false, amfRequest, "responseContent", this )
    {
      @Override
      public String getDefaultValue()
      {
View Full Code Here

    // Add request properties
    refreshRequestProperties();

    // init default properties
    addProperty( new TestStepBeanProperty( "Endpoint", false, testRequest, "endpoint", this, false ) );
    addProperty( new TestStepBeanProperty( "Username", false, testRequest, "username", this, true ) );
    addProperty( new TestStepBeanProperty( "Password", false, testRequest, "password", this, true ) );
    addProperty( new TestStepBeanProperty( "Domain", false, testRequest, "domain", this, false ) );

    // init properties
    addProperty( new TestStepBeanProperty( "Request", false, testRequest, "requestContent", this, true )
    {
      @Override
      public String getDefaultValue()
      {
        return createDefaultRequestContent();
      }

      public SchemaType getSchemaType()
      {
        try
        {
          // first the DOM of the current request
          Document dom = XmlUtils.parseXml( getTestRequest().getRequestContent() );

          // get matching representations
          for( RestRepresentation representation : getTestRequest().getRepresentations( Type.REQUEST,
              getTestRequest().getMediaType() ) )
          {
            // is request element same as that of representation?
            if( representation.getElement().equals( XmlUtils.getQName( dom.getDocumentElement() ) ) )
            {
              // this is it, return its type
              return representation.getSchemaType();
            }
          }
        }
        catch( Exception e )
        {
          SoapUI.logError( e );
        }

        // found nothing.. fall back
        return super.getSchemaType();
      }

      @Override
      public QName getType()
      {
        return getSchemaType().getName();
      }

    } );

    addProperty( new TestStepBeanProperty( WsdlTestStepWithProperties.RESPONSE_AS_XML, true, testRequest,
        "responseContentAsXml", this )
    {
      @Override
      public String getDefaultValue()
      {
        return createDefaultResponseXmlContent();
      }

      public SchemaType getSchemaType()
      {
        try
        {
          // first the DOM of the current request
          Document dom = XmlUtils.parseXml( getTestRequest().getResponseContentAsXml() );

          // get matching representations
          for( RestRepresentation representation : getTestRequest().getRepresentations( Type.RESPONSE,
              getTestRequest().getResponse().getContentType() ) )
          {
            // is request element same as that of representation?
            if( representation.getElement().equals( XmlUtils.getQName( dom.getDocumentElement() ) ) )
            {
              // this is it, return its type
              return representation.getSchemaType();
            }
          }
        }
        catch( Exception e )
        {
          SoapUI.logError( e );
        }

        // found nothing.. fall back
        return super.getSchemaType();
      }

      @Override
      public QName getType()
      {
        return getSchemaType().getName();
      }
    } );

    addProperty( new TestStepBeanProperty( "Response", true, testRequest, "responseContentAsString", this )
    {
      @Override
      public String getDefaultValue()
      {
        return createDefaultRawResponseContent();
View Full Code Here

    initAssertions();
  }

  private void addResponseAsXmlVirtualProperty()
  {
    TestStepBeanProperty responseProperty = new TestStepBeanProperty( WsdlTestStepWithProperties.RESPONSE_AS_XML,
        false, this, "responseContent", this )
    {
      @Override
      public String getDefaultValue()
      {
View Full Code Here

  private void initProperties()
  {
    if( mockResponse != null )
    {
      addProperty( new TestStepBeanProperty( "Response", false, mockResponse, "responseContent", this ) );
    }

    addProperty( new DefaultTestStepProperty( "Request", true, new DefaultTestStepProperty.PropertyHandlerAdapter()
    {
      public String getValue( DefaultTestStepProperty property )
View Full Code Here

    }
  }

  private void initRequestProperties()
  {
    addProperty( new TestStepBeanProperty( "Endpoint", false, testRequest, "endpoint", this, false ) );
    addProperty( new TestStepBeanProperty( "Username", false, testRequest, "username", this, true ) );
    addProperty( new TestStepBeanProperty( "Password", false, testRequest, "password", this, true ) );
    addProperty( new TestStepBeanProperty( "Domain", false, testRequest, "domain", this, false ) );
    addProperty( new TestStepBeanProperty( "Request", false, testRequest, "requestContent", this, true )
    {
      @Override
      public String getDefaultValue()
      {
        return getOperation().createRequest( true );
      }

      @Override
      public SchemaType getSchemaType()
      {
        try
        {
          WsdlInterface iface = getOperation().getInterface();
          if( WsdlUtils.isRpc( iface.getBinding() ) )
            return WsdlUtils.generateRpcBodyType( getOperation() );
          else
            return iface.getDefinitionContext().getSchemaTypeSystem()
                .findElement( getOperation().getRequestBodyElementQName() ).getType();
        }
        catch( Exception e )
        {
          SoapUI.logError( e );
          return XmlString.type;
        }
      }

      @Override
      public QName getType()
      {
        return getSchemaType().getName();
      }

    } );
    addProperty( new TestStepBeanProperty( "Response", true, testRequest, "responseContent", this )
    {
      @Override
      public String getDefaultValue()
      {
        return getOperation().createResponse( true );
View Full Code Here

      {
        return scriptResult == null ? null : scriptResult.toString();
      }
    }, this ) );

    addProperty( new TestStepBeanProperty( "script", false, this, "script", this ) );

    scriptEngine = SoapUIScriptEngineRegistry.create( this );
    scriptEngine.setScript( getScript() );
    if( forLoadTest && !isDisabled() )
      try
View Full Code Here

            public String getValue(DefaultTestStepProperty property) {
                return getLastResult() == null ? null : getLastResult().getResult();
            }
        }, this));

        addProperty(new TestStepBeanProperty("ExpectedResult", false, this, "expectedResult", this));
    }
View Full Code Here

        for (TestProperty property : testRequest.getProperties().values()) {
            addProperty(new RestTestStepProperty((RestParamProperty) property));
        }

        // init default properties
        addProperty(new TestStepBeanProperty("Endpoint", false, testRequest, "endpoint", this, false));
        addProperty(new TestStepBeanProperty("Username", false, testRequest, "username", this, true));
        addProperty(new TestStepBeanProperty("Password", false, testRequest, "password", this, true));
        addProperty(new TestStepBeanProperty("Domain", false, testRequest, "domain", this, false));

        // init properties
        addProperty(new TestStepBeanProperty("Request", false, testRequest, "requestContent", this, true) {
            @Override
            public String getDefaultValue() {
                return createDefaultRequestContent();
            }
        });

        addProperty(new TestStepBeanProperty(WsdlTestStepWithProperties.RESPONSE_AS_XML, true, testRequest,
                "responseContentAsXml", this) {
            @Override
            public String getDefaultValue() {
                return createDefaultResponseXmlContent();
            }
        });

        addProperty(new TestStepBeanProperty("Response", true, testRequest, "responseContentAsString", this) {
            @Override
            public String getDefaultValue() {
                return createDefaultRawResponseContent();
            }
        });
View Full Code Here

TOP

Related Classes of com.eviware.soapui.model.support.TestStepBeanProperty

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.