Package com.eviware.soapui.model.testsuite

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


      {
        ix = ignoreCase ? content.toUpperCase().indexOf( replToken.toUpperCase() ) : content.indexOf( replToken );
      }

      if( ix == -1 )
        throw new AssertionException( new AssertionError( "Missing token [" + replToken + "] in " + type ) );
    }

    return "Response contains token [" + replToken + "]";
  }
View Full Code Here


      StringBuilder sb = new StringBuilder( "Missing resources: \n" );
      for( String url : missingResourcesList )
      {
        sb.append( url + "  ;\n" );
      }
      throw new AssertionException( new AssertionError( sb.toString() ) );
    }

    return "HTTP Download all resources OK";
  }
View Full Code Here

      new WsaValidator( ( WsdlMessageExchange )messageExchange, wsaAssertionConfiguration )
          .validateWsAddressingResponse();
    }
    catch( AssertionException e )
    {
      throw new AssertionException( new AssertionError( e.getMessage() ) );
    }
    catch( XmlException e )
    {
      SoapUI.logError( e );
      throw new AssertionException( new AssertionError(
          "There has been some XmlException, WS-A couldn't be validated properly." ) );
    }

    return "Response WS-Addressing is valid";
  }
View Full Code Here

      new WsaValidator( ( WsdlMessageExchange )messageExchange, wsaAssertionConfiguration )
          .validateWsAddressingRequest();
    }
    catch( AssertionException e )
    {
      throw new AssertionException( new AssertionError( e.getMessage() ) );
    }
    catch( XmlException e )
    {
      SoapUI.logError( e );
      throw new AssertionException( new AssertionError(
          "There has been some XmlException, ws-a couldn't be validated properly." ) );
    }

    return "Request WS-Addressing is valid";
  }
View Full Code Here

      throws AssertionException
  {
    Vector<?> result = ( ( WsdlMessageExchange )messageExchange ).getRequestWssResult();

    if( result == null || result.isEmpty() )
      throw new AssertionException( new AssertionError( "Missing WS-Security results" ) );

    for( int c = 0; c < result.size(); c++ )
    {
      if( result.get( c ) instanceof Exception )
      {
        throw new AssertionException( new AssertionError( "WS-Security validation failed: " + result.get( c ) ) );
      }
    }

    return "WS-Security status OK";
  }
View Full Code Here

      throws AssertionException
  {
    Vector<?> result = ( ( WsdlMessageExchange )messageExchange ).getResponseWssResult();

    if( result == null || result.isEmpty() )
      throw new AssertionException( new AssertionError( "Missing WS-Security results" ) );

    for( int c = 0; c < result.size(); c++ )
    {
      if( result.get( c ) instanceof Exception )
      {
        throw new AssertionException( new AssertionError( "WS-Security validation failed: " + result.get( c ) ) );
      }
    }

    return "WS-Security status OK";
  }
View Full Code Here

      {
        msg = "XPathContains assertion failed for path [" + path + "] : " + e.getClass().getSimpleName() + ":"
            + e.getMessage();
      }

      throw new AssertionException( new AssertionError( msg ) );
    }

    return type + " matches content for [" + path + "]";
  }
View Full Code Here

    {
      SoapVersion soapVersion = ( ( WsdlMessageExchange )messageExchange ).getOperation().getInterface()
          .getSoapVersion();

      if( !SoapUtils.isSoapFault( responseContent, soapVersion ) )
        throw new AssertionException( new AssertionError( "Response is not a SOAP Fault" ) );
    }
    catch( Exception e )
    {
      throw new AssertionException( new AssertionError( e.getMessage() ) );
    }

    return "Response is a SOAP Fault";
  }
View Full Code Here

    try
    {
      AssertionError[] errors = validator.assertResponse( ( WsdlMessageExchange )messageExchange, true );
      if( errors.length > 0 )
        throw new AssertionException( errors );
    }
    catch( AssertionException e )
    {
      throw e;
    }
    catch( Exception e )
    {
      throw new AssertionException( new AssertionError( e.getMessage() ) );
    }

    return "Response Envelope OK";
  }
View Full Code Here

      {
        ix = ignoreCase ? content.toUpperCase().indexOf( replToken.toUpperCase() ) : content.indexOf( replToken );
      }

      if( ix != -1 )
        throw new AssertionException( new AssertionError( type + " contains token [" + replToken + "]" ) );
    }

    return type + " does not contain token [" + replToken + "]";
  }
View Full Code Here

TOP

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

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.