Package org.switchyard.config.model

Examples of org.switchyard.config.model.Validation


public class V1ClojureComponentImplementationModelTest {
   
    @Test
    public void inlineScript() throws Exception {
        final V1ClojureComponentImplementationModel implModel = getImplModel("switchyard-clojure-impl.xml");
        final Validation validateModel = implModel.validateModel();
      
        assertThat(validateModel.isValid(), is(true));
        final String script = implModel.getScriptModel().getScript();
        assertThat(script, is(equalTo("(ns printer)(defn print-string [arg] (println arg))")));
    }
View Full Code Here


    }
   
    @Test
    public void externalFileScript() throws Exception {
        final V1ClojureComponentImplementationModel implModel = getImplModel("switchyard-clojure-impl-file.xml");
        final Validation validateModel = implModel.validateModel();
      
        assertThat(validateModel.isValid(), is(true));
        assertThat(implModel.injectExchange(), is(true));
        assertThat(implModel.getScriptFile(), is(equalTo("sample.clj")));
        assertThat(Classes.getResourceAsStream(implModel.getScriptFile(), getClass()), is(notNullValue()));
    }
View Full Code Here

    }

    @Test
    public void validateCamelBindingModelWithBeanElement() throws Exception {
        final V1CamelSftpBindingModel bindingModel = getFirstCamelBinding(CAMEL_XML);
        final Validation validateModel = bindingModel.validateModel();

        assertTrue(validateModel.getMessage(), validateModel.isValid());
    }
View Full Code Here

TOP

Related Classes of org.switchyard.config.model.Validation

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.