Examples of FlowDescriptionDriver


Examples of com.asakusafw.compiler.flow.FlowDescriptionDriver

    /**
     * no input.
     */
    @Test
    public void validate_no_input() {
        FlowDescriptionDriver flow = new FlowDescriptionDriver();
        In<Line1> in = flow.createIn("in1", new DirectImporterDescription(Line1.class, "some/file-*"));
        Out<Line1> out = flow.createOut("out1", new Output(format, "something", "output.txt"));

        FlowDescription desc = new IdentityFlow<Line1>(in, out);
        JobflowInfo info = compile(flow, desc);
        assertThat(info, is(not(nullValue())));
    }
View Full Code Here

Examples of com.asakusafw.compiler.flow.FlowDescriptionDriver

    /**
     * no output.
     */
    @Test
    public void validate_no_output() {
        FlowDescriptionDriver flow = new FlowDescriptionDriver();
        In<Line1> in = flow.createIn("in1", new Input(format, "something", "input.txt"));
        Out<Line1> out = flow.createOut("out1", new DirectExporterDescription(Line1.class, "some/file-*"));

        FlowDescription desc = new IdentityFlow<Line1>(in, out);
        JobflowInfo info = compile(flow, desc);
        assertThat(info, is(not(nullValue())));
    }
View Full Code Here

Examples of com.asakusafw.compiler.flow.FlowDescriptionDriver

    /**
     * input size is tiny.
     */
    @Test
    public void validate_input_tiny() {
        FlowDescriptionDriver flow = new FlowDescriptionDriver();
        In<Line1> in = flow.createIn("in1", new Input(
                Line1.class, format, "input", "input.txt", DataSize.TINY));
        Out<Line1> out = flow.createOut("out1", new Output(format, "output", "output.txt"));

        FlowDescription desc = new IdentityFlow<Line1>(in, out);
        JobflowInfo info = compile(flow, desc);
        assertThat(info, is(not(nullValue())));
    }
View Full Code Here

Examples of com.asakusafw.compiler.flow.FlowDescriptionDriver

    /**
     * input contains a variable.
     */
    @Test
    public void validate_input_variable() {
        FlowDescriptionDriver flow = new FlowDescriptionDriver();
        In<Line1> in = flow.createIn("in1", new Input(format, "input", "${input}.txt"));
        Out<Line1> out = flow.createOut("out1", new Output(format, "output", "output.txt"));

        FlowDescription desc = new IdentityFlow<Line1>(in, out);
        JobflowInfo info = compile(flow, desc);
        assertThat(info, is(not(nullValue())));
    }
View Full Code Here

Examples of com.asakusafw.compiler.flow.FlowDescriptionDriver

    /**
     * output parameterize.
     */
    @Test
    public void validate_output_pattern() {
        FlowDescriptionDriver flow = new FlowDescriptionDriver();
        In<Line1> in = flow.createIn("in1", new Input(format, "input", "input.txt"));
        Out<Line1> out = flow.createOut("out1", new Output(format, "output", "{first}.txt"));

        FlowDescription desc = new IdentityFlow<Line1>(in, out);
        JobflowInfo info = compile(flow, desc);
        assertThat(info, is(not(nullValue())));
    }
View Full Code Here

Examples of com.asakusafw.compiler.flow.FlowDescriptionDriver

    /**
     * output contains a variable.
     */
    @Test
    public void validate_output_variable() {
        FlowDescriptionDriver flow = new FlowDescriptionDriver();
        In<Line1> in = flow.createIn("in1", new Input(format, "input", "input.txt"));
        Out<Line1> out = flow.createOut("out1", new Output(format, "output", "${output}.txt"));

        FlowDescription desc = new IdentityFlow<Line1>(in, out);
        JobflowInfo info = compile(flow, desc);
        assertThat(info, is(not(nullValue())));
    }
View Full Code Here

Examples of com.asakusafw.compiler.flow.FlowDescriptionDriver

    /**
     * output with wildcard.
     */
    @Test
    public void validate_output_wildcard() {
        FlowDescriptionDriver flow = new FlowDescriptionDriver();
        In<Line1> in = flow.createIn("in1", new Input(format, "input", "input.txt"));
        Out<Line1> out = flow.createOut("out1", new Output(format, "output", "*.txt"));

        FlowDescription desc = new IdentityFlow<Line1>(in, out);
        JobflowInfo info = compile(flow, desc);
        assertThat(info, is(not(nullValue())));
    }
View Full Code Here

Examples of com.asakusafw.compiler.flow.FlowDescriptionDriver

    /**
     * output ordering.
     */
    @Test
    public void validate_output_asc() {
        FlowDescriptionDriver flow = new FlowDescriptionDriver();
        In<Line1> in = flow.createIn("in1", new Input(format, "input", "input.txt"));
        Out<Line1> out = flow.createOut("out1", new Output(format, "output", "output.txt", "+value"));

        FlowDescription desc = new IdentityFlow<Line1>(in, out);
        JobflowInfo info = compile(flow, desc);
        assertThat(info, is(not(nullValue())));
    }
View Full Code Here

Examples of com.asakusafw.compiler.flow.FlowDescriptionDriver

    /**
     * output ordering.
     */
    @Test
    public void validate_output_desc() {
        FlowDescriptionDriver flow = new FlowDescriptionDriver();
        In<Line1> in = flow.createIn("in1", new Input(format, "input", "input.txt"));
        Out<Line1> out = flow.createOut("out1", new Output(format, "output", "output.txt", "-value"));

        FlowDescription desc = new IdentityFlow<Line1>(in, out);
        JobflowInfo info = compile(flow, desc);
        assertThat(info, is(not(nullValue())));
    }
View Full Code Here

Examples of com.asakusafw.compiler.flow.FlowDescriptionDriver

    /**
     * output ordering.
     */
    @Test
    public void validate_output_complexorder() {
        FlowDescriptionDriver flow = new FlowDescriptionDriver();
        In<Line1> in = flow.createIn("in1", new Input(format, "input", "input.txt"));
        Out<Line1> out = flow.createOut("out1", new Output(format, "output", "output.txt", "-length", "+position"));

        FlowDescription desc = new IdentityFlow<Line1>(in, out);
        JobflowInfo info = compile(flow, desc);
        assertThat(info, is(not(nullValue())));
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.