Package com.eviware.soapui.config

Examples of com.eviware.soapui.config.TestAssertionConfig


              scan.setExecutionStrategy( check.getExecutionStrategy() );
              scan.setType( checkToScanMap.get( check.getType() ) );

              for( TestAssertionConfig assertion : check.getAssertionList() )
              {
                TestAssertionConfig assertion2 = scan.addNewAssertion();

                assertion2.setConfiguration( assertion.getConfiguration() );
                assertion2.setType( assertion.getType() );
                assertion2.setName( assertion.getName() );
                if( assertion.isSetDescription() )
                {
                  assertion2.setDescription( assertion.getDescription() );
                }
                if( assertion.isSetDisabled() )
                {
                  assertion2.setDisabled( assertion.getDisabled() );
                }
                if( assertion.isSetId() )
                {
                  assertion2.setId( assertion.getId() );
                }
                if( assertion.isSetTimestamp() )
                {
                  assertion2.setTimestamp( assertion.getTimestamp() );
                }
              }

              scan.setCheckedParameters( check.getCheckedPameters() );
View Full Code Here


    // if first selected can't move up and if last selected can't move down
    if( ( ix == 0 && offset == -1 ) || ( ix == assertions.size() - 1 && offset == 1 ) )
    {
      return assertion;
    }
    TestAssertionConfig conf = assertion.getConfig();
    XmlObject newXmlObject = conf.copy();

    TestAssertionConfig newConf = TestAssertionConfig.Factory.newInstance();
    newConf.set( newXmlObject );
    WsdlMessageAssertion newAssertion = TestAssertionRegistry.getInstance().buildAssertion( newConf, assertable );

    assertion.removePropertyChangeListener( this );
    assertions.remove( ix );
View Full Code Here

    List<TestAssertionConfig> assertionList = assertableConfig.getAssertionList();

    for( int i = 0; i < assertionList.size(); i++ )
    {
      TestAssertionConfig config = assertionList.get( i );
      if( TestAssertionRegistry.getInstance().canBuildAssertion( config ) )
      {
        assertions.get( i - mod ).updateConfig( config );
      }
      else
View Full Code Here

  }

  public WsdlMessageAssertion importAssertion( WsdlMessageAssertion source, boolean overwrite, boolean createCopy,
      String newName )
  {
    TestAssertionConfig conf = assertableConfig.addNewAssertion();
    conf.set( source.getConfig() );
    conf.setName( newName );
    if( createCopy && conf.isSetId() )
      conf.unsetId();

    if( !source.isAllowMultiple() )
    {
      List<WsdlMessageAssertion> existing = getAssertionsOfType( source.getClass() );
      if( !existing.isEmpty() && !overwrite )
View Full Code Here

    return result;
  }

  public TestAssertion cloneAssertion( TestAssertion source, String name )
  {
    TestAssertionConfig conf = assertableConfig.addNewAssertion();
    conf.set( ( ( WsdlMessageAssertion )source ).getConfig() );
    conf.setName( name );

    WsdlMessageAssertion result = addWsdlAssertion( conf );
    fireAssertionAdded( result );
    return result;
View Full Code Here

  public WsdlMessageAssertion addWsdlAssertion( String assertionLabel )
  {
    try
    {
      TestAssertionConfig assertionConfig = assertableConfig.addNewAssertion();
      assertionConfig.setType( TestAssertionRegistry.getInstance().getAssertionTypeForName( assertionLabel ) );

      String name = assertionLabel;
      while( getAssertionByName( name.trim() ) != null )
      {
        name = UISupport.prompt(
            "Specify unique name of Assertion",
            "Rename Assertion",
            assertionLabel
                + " "
                + ( getAssertionsOfType( TestAssertionRegistry.getInstance().getAssertionClassType(
                    assertionConfig ) ).size() ) );
        if( name == null )
        {
          return null;
        }
      }
      WsdlMessageAssertion assertion = addWsdlAssertion( assertionConfig );
      if( assertion == null )
        return null;

      assertionConfig.setName( name );
      assertion.updateConfig( assertionConfig );

      if( assertion != null )
      {
        fireAssertionAdded( assertion );
View Full Code Here

    assertion = new XPathContainsAssertion( TestAssertionConfig.Factory.newInstance(), null );
  }

  public void testCreate() throws Exception
  {
    TestAssertionConfig config = createConfig( "testPath", "testContent" );

    XPathContainsAssertion assertion = new XPathContainsAssertion( config, null );

    assertEquals( "testPath", assertion.getPath() );
    assertEquals( "testContent", assertion.getExpectedContent() );
View Full Code Here

        getConfig().removeAssertion( ix );
      }

      public TestAssertionConfig insertAssertion( TestAssertionConfig source, int ix )
      {
        TestAssertionConfig conf = getConfig().insertNewAssertion( ix );
        conf.set( source );
        return conf;
      }
    } );
  }
View Full Code Here

        getConfig().removeAssertion( ix );
      }

      public TestAssertionConfig insertAssertion( TestAssertionConfig source, int ix )
      {
        TestAssertionConfig conf = getConfig().insertNewAssertion( ix );
        conf.set( source );
        return conf;
      }
    } );
  }
View Full Code Here

      testRequestConfig.setEndpoint( endpoints[0] );
    testRequestConfig.addNewRequest().setStringValue( requestContent );

    if( values.getBoolean( ADD_SOAP_RESPONSE_ASSERTION ) )
    {
      TestAssertionConfig assertionConfig = testRequestConfig.addNewAssertion();
      assertionConfig.setType( SoapResponseAssertion.ID );
    }

    if( values.getBoolean( ADD_SCHEMA_ASSERTION ) )
    {
      TestAssertionConfig assertionConfig = testRequestConfig.addNewAssertion();
      assertionConfig.setType( SchemaComplianceAssertion.ID );
    }

    if( values.getBoolean( ADD_SOAP_FAULT_ASSERTION ) )
    {
      TestAssertionConfig assertionConfig = testRequestConfig.addNewAssertion();
      assertionConfig.setType( NotSoapFaultAssertion.ID );
    }

    TestStepConfig testStep = TestStepConfig.Factory.newInstance();
    testStep.setType( REQUEST_TYPE );
    testStep.setConfig( requestStepConfig );
View Full Code Here

TOP

Related Classes of com.eviware.soapui.config.TestAssertionConfig

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.