Package com.eviware.soapui.model.testsuite

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


            throws AssertionException {
        WsdlContext wsdlContext;
        try {
            wsdlContext = (WsdlContext) getWsdlContext(messageExchange, context);
        } catch (Exception e1) {
            throw new AssertionException(new AssertionError(e1.getMessage()));
        }

        WsdlValidator validator = new WsdlValidator(wsdlContext);

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

        return "Schema compliance OK";
    }
View Full Code Here


            throws AssertionException {
        WsdlContext wsdlContext;
        try {
            wsdlContext = (WsdlContext) getWsdlContext((WsdlMessageExchange) messageExchange, context);
        } catch (Exception e1) {
            throw new AssertionException(new AssertionError(e1.getMessage()));
        }
        WsdlValidator validator = new WsdlValidator(wsdlContext);

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

        return "Schema compliance OK";
    }
View Full Code Here

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

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

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

                String match = SecurityScanUtil.contains(context, propertyValue, token, useRegexp);
                if (match != null) {
                    String message = description + " - Token [" + token + "] found [" + match + "] in property "
                            + propertyName;
                    if (!messages.contains(message)) {
                        assertionErrorList.add(new AssertionError(message));
                        messages.add(message);
                    }
                }
            }
        } catch (Throwable e) {
View Full Code Here

                            continue;
                        }
                    }
                }

                AssertionError assertionError = new AssertionError(error);
                if (!response.contains(assertionError)) {
                    response.add(assertionError);
                }
            }
View Full Code Here

        if (statusElements.length >= 2) {
            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

                        value, false);
                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

            if (match != null) {
                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

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.