Package com.eviware.soapui.model.testsuite

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


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


        try {
            // check manually before resource intensive xpath
            SoapVersion soapVersion = ((WsdlMessageExchange) messageExchange).getOperation().getInterface()
                    .getSoapVersion();
            if (SoapUtils.isSoapFault(responseContent, soapVersion)) {
                throw new AssertionException(new AssertionError("Response is a SOAP Fault"));
            }
        } catch (Exception e) {
            throw new AssertionException(new AssertionError(e.getMessage()));
        }

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

                throw new AssertionException(errors);
            }
        } catch (AssertionException e) {
            throw e;
        } catch (Exception e) {
            throw new AssertionException(new AssertionError(e.getMessage()));
        }

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

    protected String internalAssertResponse(MessageExchange messageExchange, SubmitContext context)
            throws AssertionException {

        if (context.getProperty(JdbcSubmit.JDBC_TIMEOUT) != null) {
            Long timeout = Long.valueOf(context.getProperty(JdbcSubmit.JDBC_TIMEOUT).toString());
            throw new AssertionException(new AssertionError("JDBC Request timeout error! Query not executed in "
                    + timeout + " ms."));
        }

        return "JDBC Timeout OK";
    }
View Full Code Here

            throws AssertionException {
        try {
            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

        Boolean temp = (Boolean) context.getProperty(HermesJmsRequestTransport.IS_JMS_MESSAGE_RECEIVED);
        Boolean messageReceived = temp != null ? temp : false;

        Long timeout = (Long) context.getProperty(HermesJmsRequestTransport.JMS_RECEIVE_TIMEOUT);
        if (messageReceived != null && !messageReceived) {
            throw new AssertionException(new AssertionError("JMS Message timeout error! Message is not received in "
                    + timeout + " ms."));
        }

        return "JMS Timeout OK";
    }
View Full Code Here

    protected String internalAssertResponse(MessageExchange messageExchange, SubmitContext context)
            throws AssertionException {

        Exception exception = (Exception) context.getProperty(JdbcSubmit.JDBC_ERROR);
        if (exception != null) {
            throw new AssertionException(new AssertionError(exception.getMessage()));
        }

        return "JDBC Status OK";
    }
View Full Code Here

    protected String internalAssertResponse(MessageExchange messageExchange, SubmitContext context)
            throws AssertionException {

        Exception exception = (Exception) context.getProperty(HermesJmsRequestTransport.JMS_ERROR);
        if (exception != null) {
            throw new AssertionException(new AssertionError(exception.getMessage()));
        }

        return "JMS Status OK";
    }
View Full Code Here

            throws AssertionException {
        try {
            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

    protected String internalAssertRequest(MessageExchange messageExchange, SubmitContext context)
            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

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.