Package com.consol.citrus.exceptions

Examples of com.consol.citrus.exceptions.CitrusRuntimeException


                } else {
                    buffered.write((PropertyUtils.replacePropertiesInString(line, props) + "\n").getBytes("UTF-8"));
                }
            }
        } catch (TransformerException e) {
            throw new CitrusRuntimeException(e);
        } catch (IOException e) {
            throw new CitrusRuntimeException(e);
        } catch (SAXException e) {
            throw new CitrusRuntimeException(e);
        } finally {
            if (reader != null) {
                try {
                    reader.close();
                } catch (IOException e) {
View Full Code Here


        File file = new File(OUTPUT_DIRECTORY);
        if (!file.exists()) {
            boolean success = file.mkdirs();
           
            if (!success) {
                throw new CitrusRuntimeException("Unable to create folder structure for test documentation");
            }
        }
       
        return new FileOutputStream(file.getAbsolutePath() + File.separator + fileName);
    }
View Full Code Here

        try {
            DocumentBuilderFactory documentBuilderFactory = DocumentBuilderFactory.newInstance();
            documentBuilderFactory.setNamespaceAware(true);
            return documentBuilderFactory.newDocumentBuilder();
        } catch (ParserConfigurationException e) {
            throw new CitrusRuntimeException(e);
        }
    }
View Full Code Here

            t.setOutputProperty(OutputKeys.MEDIA_TYPE, mediaType);
            t.setOutputProperty(OutputKeys.METHOD, method);
           
            return t;
        } catch (TransformerException e) {
            throw new CitrusRuntimeException(e);
        } catch (IOException e) {
            throw new CitrusRuntimeException(e);
        }
    }
View Full Code Here

        setName("fail");
    }

    @Override
    public void doExecute(TestContext context) {
        throw new CitrusRuntimeException(context.replaceDynamicContentInString(message));
    }
View Full Code Here

        return this;
    }

    @Override
    public SendSoapMessageActionDefinition soap() {
        throw new CitrusRuntimeException("Invalid use of http and soap action definition");
    }
View Full Code Here

        attachment.setContentType(contentType);

        try {
            attachment.setContent(FileUtils.readToString(contentResource));
        } catch (IOException e) {
            throw new CitrusRuntimeException("Failed to read attachment content resource", e);
        }

        getAction().getAttachments().add(attachment);
       
        return this;
View Full Code Here

        return this;
    }

    @Override
    public ReceiveHttpMessageActionDefinition http() {
        throw new CitrusRuntimeException("Invalid use of http and soap action definition");
    }
View Full Code Here

        attachment.setContentType(contentType);
       
        try {
            attachment.setContent(FileUtils.readToString(contentResource));
        } catch (IOException e) {
            throw new CitrusRuntimeException("Failed to read attachment resource", e);
        }

        getAction().getAttachments().add(attachment);
       
        return this;
View Full Code Here

        return this;
    }

    @Override
    public SendHttpMessageActionDefinition http() {
        throw new CitrusRuntimeException("Invalid use of http and soap action definition");
    }
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.