Package org.switchyard.component.camel.ftp.model.v1

Examples of org.switchyard.component.camel.ftp.model.v1.V1CamelSftpBindingModelTest


        super(FtpsEndpoint.class, CAMEL_XML);
    }

    @Override
    protected V1CamelFtpsBindingModel createTestModel() {
        V1CamelFtpsBindingModel model = (V1CamelFtpsBindingModel) new V1CamelFtpsBindingModel(CamelFtpNamespace.V_1_0.uri())
            .setDirectory(DIRECTORY)
            .setHost(HOST);

        return model.setImplict(IMPLICT);
    }
View Full Code Here


        super(SftpEndpoint.class, CAMEL_XML);
    }

    @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

        assertEquals(PRIVATE_KEY_PASSPHRASE, model.getPrivateKeyFilePassphrase());
    }

    @Override
    protected V1CamelSftpBindingModel createTestModel() {
        V1CamelSftpBindingModel model = (V1CamelSftpBindingModel) new V1CamelSftpBindingModel(CamelFtpNamespace.V_1_1.uri());
        model.getModelConfiguration().setPropertyResolver(new PropertyResolver() {
            @Override
            public Object resolveProperty(String key) {
                if ("maxMessagesPerPoll".equals(key)) {
                    return 5;
                }
                return null;
            }
        });
        model.setAdditionalUriParameters(createAdditionalUriParametersModel(CamelFtpNamespace.V_1_1.uri(), Collections.singletonMap("maxMessagesPerPoll", "${maxMessagesPerPoll}")));
        model.setDirectory(DIRECTORY)
            .setHost(HOST)
            .setPort(PORT);

        return model.setKnownHostsFile(KNOWN_HOSTS)
            .setPrivateKeyFile(PRIVATE_KEY)
            .setPrivateKeyFilePassphrase(PRIVATE_KEY_PASSPHRASE);
    }
View Full Code Here

TOP

Related Classes of org.switchyard.component.camel.ftp.model.v1.V1CamelSftpBindingModelTest

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.