Examples of AssertionError


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

      }
    }
    String cumulativeError = cumulativeErrorMsg.toString();
    if( !StringUtils.isNullOrEmpty( cumulativeError ) )
    {
      throw new AssertionException( new AssertionError( cumulativeError ) );
    }
  }
View Full Code Here

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

      }
    }
    String cumulativeError = cumulativeErrorMsg.toString();
    if( !StringUtils.isNullOrEmpty( cumulativeError ) )
    {
      throw new AssertionException( new AssertionError( cumulativeError ) );
    }
  }
View Full Code Here

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

        if( match != null )
        {
          String shortValue = value.length() > 25 ? value.substring( 0, 22 ) + "... " : value;
          String message = "XSS content sent in request '" + shortValue + "' is exposed in response on link "
              + url + " . Possibility for XSS script attack in: " + messageExchange.getModelItem().getName();
          assertionErrorList.add( new AssertionError( message ) );
          throwException = true;
        }
      }
    }
    return throwException;
View Full Code Here

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

      {
        String shortValue = value.length() > 25 ? value.substring( 0, 22 ) + "... " : value;
        String message = "Content that is sent in request '" + shortValue
            + "' is exposed in response. Possibility for XSS script attack in: "
            + messageExchange.getModelItem().getName();
        assertionErrorList.add( new AssertionError( message ) );
        throwException = true;
      }
    }
    return throwException;
  }
View Full Code Here

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

    {
      String statusCode = statusElements[1].trim();
      if( codeList.contains( statusCode ) )
      {
        String message = "Response status code: " + statusCode + " is in invalid list of status codes";
        throw new AssertionException( new AssertionError( message ) );
      }
    }
    else
    {
      throw new AssertionException( new AssertionError( "Status code extraction error! " ) );
    }

    return "OK";
  }
View Full Code Here

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

        if( match != null )
        {
          String message = description + " - Token [" + token + "] found [" + match + "]";
          if( !messages.contains( message ) )
          {
            assertionErrorList.add( new AssertionError( message ) );
            messages.add( message );
          }
        }
      }
    }
View Full Code Here

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

    {
      String statusCode = statusElements[1].trim();
      if( !codeList.contains( statusCode ) )
      {
        String message = "Response status code:" + statusCode + " is not in acceptable list of status codes";
        throw new AssertionException( new AssertionError( message ) );
      }
    }
    else
    {
      throw new AssertionException( new AssertionError( "Status code extraction error! " ) );
    }

    return "OK";
  }
View Full Code Here

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

                    return;
                }

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

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

                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

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

                        xmlOptions.setValidateTreatLaxAsSkip();
                        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
TOP
Copyright © 2018 www.massapi.com. 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.