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

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


  public WsdlMessageAssertion addWsdlAssertion( TestAssertionConfig config )
  {
    try
    {
      WsdlMessageAssertion assertion = TestAssertionRegistry.getInstance().buildAssertion( config, assertable );
      if( assertion == null )
      {
        return null;
      }
      else
      {
        assertions.add( assertion );
        assertion.addPropertyChangeListener( this );

        return assertion;
      }
    }
    catch( Exception e )
View Full Code Here


  }

  public WsdlMessageAssertion moveAssertion( int ix, int offset )
  {
    // int ix = assertions.indexOf( assertion );
    WsdlMessageAssertion assertion = getAssertionAt( ix );
    if( ix == -1 )
    {
      throw new RuntimeException( "assertion [" + assertion.getName() + "] not available " );
    }
    // 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 );

    assertion.release();

    assertableConfig.removeAssertion( ix );

    newAssertion.addPropertyChangeListener( this );
    assertions.add( ix + offset, newAssertion );

    assertableConfig.insertAssertion( newConf, ix + offset );
    fireAssertionMoved( newAssertion, ix, offset );
    return newAssertion;
View Full Code Here

      {
        removeAssertion( existing.remove( 0 ) );
      }
    }

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

  {
    TestAssertionConfig conf = assertableConfig.addNewAssertion();
    conf.set( ( ( WsdlMessageAssertion )source ).getConfig() );
    conf.setName( name );

    WsdlMessageAssertion result = addWsdlAssertion( conf );
    fireAssertionAdded( result );
    return result;

  }
View Full Code Here

        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

  public TestAssertion addAssertion( String label )
  {
    PropertyChangeNotifier notifier = new PropertyChangeNotifier();
    try
    {
      WsdlMessageAssertion assertion = assertionsSupport.addWsdlAssertion( label );
      if( assertion == null )
        return null;

      if( getAssertableContent() != null )
      {
View Full Code Here

  }

  @Override
  public TestAssertion moveAssertion( int ix, int offset )
  {
    WsdlMessageAssertion assertion = getAssertionAt( ix );
    PropertyChangeNotifier notifier = new PropertyChangeNotifier();

    try
    {
      return assertionsSupport.moveAssertion( ix, offset );
View Full Code Here

        }
    }

    public WsdlMessageAssertion addWsdlAssertion(TestAssertionConfig config) {
        try {
            WsdlMessageAssertion assertion = TestAssertionRegistry.getInstance().buildAssertion(config, assertable);
            if (assertion == null) {
                return null;
            } else {
                assertions.add(assertion);
                assertion.addPropertyChangeListener(this);

                return assertion;
            }
        } catch (Exception e) {
            SoapUI.logError(e);
View Full Code Here

        assertableConfig.removeAssertion(ix);
    }

    public WsdlMessageAssertion moveAssertion(int ix, int offset) {
        // int ix = assertions.indexOf( assertion );
        WsdlMessageAssertion assertion = getAssertionAt(ix);
        if (ix == -1) {
            throw new RuntimeException("assertion [" + assertion.getName() + "] not available ");
        }
        // 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);

        assertion.release();

        assertableConfig.removeAssertion(ix);

        newAssertion.addPropertyChangeListener(this);
        assertions.add(ix + offset, newAssertion);

        assertableConfig.insertAssertion(newConf, ix + offset);
        fireAssertionMoved(newAssertion, ix, offset);
        return newAssertion;
View Full Code Here

            while (!existing.isEmpty()) {
                removeAssertion(existing.remove(0));
            }
        }

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

TOP

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

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.