Package com.eviware.soapui.model.testsuite

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


    {
      WsdlOperation operation = getModelItem().getMockOperation().getOperation();

      if( operation == null )
      {
        return new ValidationError[] { new AssertionError( "Missing operation for MockResponse" ) };
      }

      WsdlValidator validator = new WsdlValidator( ( operation.getInterface() ).getWsdlContext() );
      return validator.assertRequest( new WsdlMockResultMessageExchange( getModelItem().getMockResult(),
          getModelItem() ), false );
View Full Code Here


    protected ValidationError[] validateXml( String xml )
    {
      WsdlOperation operation = getModelItem().getMockOperation().getOperation();
      if( operation == null )
      {
        return new ValidationError[] { new AssertionError( "Missing operation for MockResponse" ) };
      }

      WsdlValidator validator = new WsdlValidator( ( operation.getInterface() ).getWsdlContext() );
      return validator.assertResponse( new WsdlMockResponseMessageExchange( getModelItem() ), false );
    }
View Full Code Here

            xmlObject.validate( xmlOptions );

            for( Object o : list )
            {
              if( o instanceof XmlError )
                result.add( new AssertionError( ( XmlError )o ) );
              else
                result.add( new AssertionError( o.toString() ) );
            }

            asserted = true;
          }
          catch( XmlException e )
          {
            SoapUI.logError( e );
          }
        }
        else
        {
          asserted = true;
        }
      }
    }

    if( !asserted && result.isEmpty() )
    {
      result.add( new AssertionError( "Missing matching representation for request with contentType ["
          + messageExchange.getResponseContentType() + "]" ) );
    }

    return result.toArray( new AssertionError[result.size()] );
  }
View Full Code Here

          return;
        }

        if( obj instanceof AssertionError )
        {
          AssertionError error = ( AssertionError )obj;
          if( error.getLineNumber() >= 0 )
          {
            selectError( error );
          }
          else
            Toolkit.getDefaultToolkit().beep();
View Full Code Here

        if( assertion.isDisabled() && isEnabled() )
          setEnabled( false );
      }
      else if( value instanceof AssertionError )
      {
        AssertionError assertion = ( AssertionError )value;
        setText( " -> " + assertion.toString() );
        setIcon( null );
      }
      else if( value instanceof String )
      {
        setText( value.toString() );
View Full Code Here

              continue;
            }
          }
        }

        AssertionError assertionError = new AssertionError( error );
        if( !response.contains( assertionError ) )
          response.add( assertionError );
      }

      return response.toArray( new AssertionError[response.size()] );
View Full Code Here

      {
        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

TOP

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

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.