Package com.consol.citrus.exceptions

Examples of com.consol.citrus.exceptions.CitrusRuntimeException


        try {
            if (applicationContext != null) {
                afterPropertiesSet();
            }
        } catch (Exception e) {
            throw new CitrusRuntimeException("Failed to setup test builder with application context", e);
        }
    }
View Full Code Here


     * If no Spring bean application context is set an exception is raised. Users may want to create proper test context
     * instance themselves in case Spring application context is not present. Otherwise set application context before execution properly.
     */
    public void execute() {
        if (applicationContext == null) {
            throw new CitrusRuntimeException("Unable to create test context for test builder execution without Spring bean application context set properly");
        }

        TestContext context = applicationContext.getBean(TestContext.class);
        context.setApplicationContext(applicationContext);
        execute(context);
View Full Code Here

    public GroovyActionDefinition groovy(Resource scriptResource) {
        GroovyAction action = new GroovyAction();
        try {
            action.setScript(FileUtils.readToString(scriptResource));
        } catch (IOException e) {
            throw new CitrusRuntimeException("Failed to read script resource", e);
        }

        testCase.addTestAction(action);

        return new GroovyActionDefinition(action);
View Full Code Here

                    try {
                        if (sequenceAfterSuite.shouldExecute(suiteName, null)) {
                            sequenceAfterSuite.execute(context);
                        }
                    } catch (Exception e) {
                        throw new CitrusRuntimeException("After suite failed with errors", e);
                    }
                }
            } else {
                testSuiteListener.onFinish();
                testSuiteListener.onFinishSuccess();
View Full Code Here

                        endpointConfiguration.getMessageConverter().convertOutbound(exchange, message, endpointConfiguration);
                    }
                });

        if (camelExchange.getException() != null) {
            throw new CitrusRuntimeException("Sending message to camel endpoint resulted in exception", camelExchange.getException());
        }

        onOutboundMessage(message, context);

        log.info("Message was successfully sent to camel endpoint '" + endpointConfiguration.getEndpointUri() + "'");
View Full Code Here

                    }
                }
            }
        }
       
        throw new CitrusRuntimeException("Could not find test with name '"
                + testName + "'. Test directory is: " + startDir);
    }
View Full Code Here

                }
            }
           
            writer.flush();
        } catch (IOException e) {
            throw new CitrusRuntimeException("Failed to write message trace to filesystem", e);
        } finally {
            if (writer != null) {
                try {
                    writer.close();
                } catch (IOException e) {
View Full Code Here

    public void afterPropertiesSet() throws Exception {
        if (!outputDirectory.exists()) {
            boolean success = outputDirectory.getFile().mkdirs();
           
            if (!success) {
                throw new CitrusRuntimeException("Unable to create output directory structure for message tracing");
            }
        }
    }
View Full Code Here

                matchingValidators.add(validator);
            }
        }
       
        if (matchingValidators.isEmpty()) {
            throw new CitrusRuntimeException("Could not find proper message validator for message type '" +
                    messageType + "', please define a capable message validator for this message type");
        }

        log.info(String.format("Found %s message validators for message type: %s", matchingValidators.size(), messageType));
       
View Full Code Here

    /**
     * Check if we have at least one message validator available.
     */
    public void afterPropertiesSet() throws Exception {
        if (messageValidators.isEmpty()) {
            throw new CitrusRuntimeException("No message validators available in Spring bean context - " +
                    "please define message validators!");
        }
    }
View Full Code Here

TOP

Related Classes of com.consol.citrus.exceptions.CitrusRuntimeException

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.