Package com.asakusafw.windgate.core

Examples of com.asakusafw.windgate.core.DriverScript


     * Contains null column.
     */
    @Test(expected = IllegalStateException.class)
    public void has_null_column() {
        Mock mock = new Mock(String.class, "testing", StringSupport.class, "TESTING", null, "VALUE", null);
        DriverScript script = mock.getDriverScript();
        assertThat(script.getResourceName(), is(Constants.JDBC_RESOURCE_NAME));
        script.getConfiguration();
    }
View Full Code Here


     * JDBC Support not specified.
     */
    @Test(expected = IllegalStateException.class)
    public void no_support() {
        Mock mock = new Mock(String.class, "testing", null, "TESTING", null, "VALUE");
        DriverScript script = mock.getDriverScript();
        assertThat(script.getResourceName(), is(Constants.JDBC_RESOURCE_NAME));
        script.getConfiguration();
    }
View Full Code Here

     * Inconsistent JDBC support.
     */
    @Test(expected = IllegalStateException.class)
    public void invalid_type_support() {
        Mock mock = new Mock(String.class, "testing", VoidSupport.class, "TESTING", null, "VALUE");
        DriverScript script = mock.getDriverScript();
        assertThat(script.getResourceName(), is(Constants.JDBC_RESOURCE_NAME));
        script.getConfiguration();
    }
View Full Code Here

     * Columns are not supported.
     */
    @Test(expected = IllegalStateException.class)
    public void invalid_columns() {
        Mock mock = new Mock(String.class, "testing", NullSupport.class, "TESTING", null, "VALUE");
        DriverScript script = mock.getDriverScript();
        assertThat(script.getResourceName(), is(Constants.JDBC_RESOURCE_NAME));
        script.getConfiguration();
    }
View Full Code Here

     * Inconsistent JDBC support.
     */
    @Test(expected = IllegalStateException.class)
    public void invalid_support_class() {
        Mock mock = new Mock(String.class, "testing", InvalidSupport.class, "TESTING", null, "VALUE");
        DriverScript script = mock.getDriverScript();
        assertThat(script.getResourceName(), is(Constants.JDBC_RESOURCE_NAME));
        script.getConfiguration();
    }
View Full Code Here

    private ProcessScript<String> script(File source, File drain) {
        return new ProcessScript<String>(
                "example",
                "plain",
                String.class,
                new DriverScript("fs", Collections.singletonMap(FileProcess.FILE.key(), source.getPath())),
                new DriverScript("fs", Collections.singletonMap(FileProcess.FILE.key(), drain.getPath())));
    }
View Full Code Here

    private ProcessScript<?> toProcessScript(Input input) {
        assert input != null;
        WindGateImporterDescription desc = extract(input.getDescription());
        String location = getInputLocation(input.getDescription()).toPath('/');
        DriverScript drain = new DriverScript(
                Constants.HADOOP_FILE_RESOURCE_NAME,
                Collections.singletonMap(FileProcess.FILE.key(), location));
        return createProcessScript(
                input.getDescription().getName(),
                desc.getModelType(),
View Full Code Here

    private ProcessScript<?> toProcessScript(Output output) {
        assert output != null;
        WindGateExporterDescription desc = extract(output.getDescription());
        String location = getOutputLocation(output.getDescription()).toPath('/');
        DriverScript source = new DriverScript(
                Constants.HADOOP_FILE_RESOURCE_NAME,
                Collections.singletonMap(FileProcess.FILE.key(), location));
        return createProcessScript(
                output.getDescription().getName(),
                desc.getModelType(),
View Full Code Here

        }
        return null;
    }

    private DriverScript dummy() {
        return new DriverScript("example", Collections.<String, String>emptyMap());
    }
View Full Code Here

            return "testing";
        }

        @Override
        public DriverScript getDriverScript() {
            DriverScript driver = new DriverScript(
                    "file",
                    Collections.singletonMap(FileProcess.FILE.key(), file.getAbsolutePath()));
            return driver;
        }
View Full Code Here

TOP

Related Classes of com.asakusafw.windgate.core.DriverScript

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.