Examples of AssertionException


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

    }

    protected String internalAssertProperty(TestPropertyHolder source, String propertyName,
                                            MessageExchange messageExchange, SubmitContext context) throws AssertionException {
        if (!XmlUtils.seemsToBeXml(source.getPropertyValue(propertyName))) {
            throw new AssertionException(new AssertionError("Property '" + propertyName
                    + "' has value which is not xml!"));
        }
        return assertContent(source.getPropertyValue(propertyName), context, propertyName);
    }
View Full Code Here

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

            }
        } catch (Throwable e) {
            String msg = "XQuery Match 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

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

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

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

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

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

        if (missingResourcesList != null && !missingResourcesList.isEmpty()) {
            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

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

            scriptEngine.setVariable("assertion", this);

            Object result = scriptEngine.run();
            return result == null ? null : result.toString();
        } catch (Throwable e) {
            throw new AssertionException(new AssertionError(e.getMessage()));
        } finally {
            scriptEngine.clearVariables();
        }
    }
View Full Code Here

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

    }

    protected String internalAssertProperty(TestPropertyHolder source, String propertyName,
                                            MessageExchange messageExchange, SubmitContext context) throws AssertionException {
        if (!XmlUtils.seemsToBeXml(source.getPropertyValue(propertyName))) {
            throw new AssertionException(new AssertionError("Property '" + propertyName
                    + "' has value which is not xml!"));
        }
        return assertContent(source.getPropertyValue(propertyName), context, propertyName);
    }
View Full Code Here

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

            } else {
                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

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

            } else {
                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

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

        Response response = messageExchange.getResponse();
        long timeTaken = response == null ? messageExchange.getTimeTaken() : response.getTimeTaken();

        // assert!
        if (timeTaken > Long.parseLong(PropertyExpander.expandProperties(context, SLA))) {
            throw new AssertionException(new AssertionError("Response did not meet SLA " + timeTaken + "/" + SLA));
        }

        return "Response meets SLA";
    }
View Full Code Here

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

            return assertWsdlResponse((WsdlMessageExchange) messageExchange, context);
        } else if (messageExchange instanceof RestMessageExchange) {
            return assertWadlResponse((RestMessageExchange) messageExchange, context);
        }

        throw new AssertionException(new AssertionError("Unknown MessageExchange type"));
    }
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.