Package com.asakusafw.compiler.flow

Examples of com.asakusafw.compiler.flow.FlowDescriptionDriver


     * Simple case.
     * @throws Exception if failed
     */
    @Test
    public void simple() throws Exception {
        FlowDescriptionDriver flow = new FlowDescriptionDriver();
        In<Simple> in = flow.createIn("in1", new Import(Simple.class, "testing", dummy()));
        Out<Simple> out = flow.createOut("out1", new Export(Simple.class, "testing", dummy()));

        FlowDescription desc = new IdentityFlow<Simple>(in, out);

        JobflowInfo info = compile(flow, desc);
        assertThat(info, not(nullValue()));
View Full Code Here


     * Different profiles.
     * @throws Exception if failed
     */
    @Test
    public void different_profile() throws Exception {
        FlowDescriptionDriver flow = new FlowDescriptionDriver();
        In<Simple> in = flow.createIn("in1", new Import(Simple.class, "testing", dummy()));
        Out<Simple> out = flow.createOut("out1", new Export(Simple.class, "other", dummy()));

        FlowDescription desc = new IdentityFlow<Simple>(in, out);

        JobflowInfo info = compile(flow, desc);
        assertThat(info, not(nullValue()));
View Full Code Here

     * Multiple I/O with same profile.
     * @throws Exception if failed
     */
    @Test
    public void same_profile() throws Exception {
        FlowDescriptionDriver flow = new FlowDescriptionDriver();
        In<Simple> in1 = flow.createIn("in1", new Import(Simple.class, "testing", dummy()));
        In<Simple> in2 = flow.createIn("in2", new Import(Simple.class, "testing", dummy()));
        Out<Simple> out1 = flow.createOut("out1", new Export(Simple.class, "testing", dummy()));
        Out<Simple> out2 = flow.createOut("out2", new Export(Simple.class, "testing", dummy()));

        FlowDescription desc = new DualIdentityFlow<Simple>(in1, in2, out1, out2);

        JobflowInfo info = compile(flow, desc);
        assertThat(info, not(nullValue()));
View Full Code Here

     * Multiple I/O with different profiles in input.
     * @throws Exception if failed
     */
    @Test
    public void mutlti_profile_input() throws Exception {
        FlowDescriptionDriver flow = new FlowDescriptionDriver();
        In<Simple> in1 = flow.createIn("in1", new Import(Simple.class, "testing", dummy()));
        In<Simple> in2 = flow.createIn("in2", new Import(Simple.class, "other", dummy()));
        Out<Simple> out1 = flow.createOut("out1", new Export(Simple.class, "testing", dummy()));
        Out<Simple> out2 = flow.createOut("out2", new Export(Simple.class, "testing", dummy()));

        FlowDescription desc = new DualIdentityFlow<Simple>(in1, in2, out1, out2);

        JobflowInfo info = compile(flow, desc);
        assertThat(info, not(nullValue()));
View Full Code Here

     * Multiple I/O with different profiles in input.
     * @throws Exception if failed
     */
    @Test
    public void multi_profile_output() throws Exception {
        FlowDescriptionDriver flow = new FlowDescriptionDriver();
        In<Simple> in1 = flow.createIn("in1", new Import(Simple.class, "testing", dummy()));
        In<Simple> in2 = flow.createIn("in2", new Import(Simple.class, "testing", dummy()));
        Out<Simple> out1 = flow.createOut("out1", new Export(Simple.class, "testing", dummy()));
        Out<Simple> out2 = flow.createOut("out2", new Export(Simple.class, "other", dummy()));

        FlowDescription desc = new DualIdentityFlow<Simple>(in1, in2, out1, out2);

        JobflowInfo info = compile(flow, desc);
        assertThat(info, not(nullValue()));
View Full Code Here

     * Multiple I/O with different profiles in input and output.
     * @throws Exception if failed
     */
    @Test
    public void multi_profile_inout() throws Exception {
        FlowDescriptionDriver flow = new FlowDescriptionDriver();
        In<Simple> in1 = flow.createIn("in1", new Import(Simple.class, "testing", dummy()));
        In<Simple> in2 = flow.createIn("in2", new Import(Simple.class, "other", dummy()));
        Out<Simple> out1 = flow.createOut("out1", new Export(Simple.class, "testing", dummy()));
        Out<Simple> out2 = flow.createOut("out2", new Export(Simple.class, "other", dummy()));

        FlowDescription desc = new DualIdentityFlow<Simple>(in1, in2, out1, out2);

        JobflowInfo info = compile(flow, desc);
        assertThat(info, not(nullValue()));
View Full Code Here

     * Importer script is invalid.
     * @throws Exception if failed
     */
    @Test
    public void invalid_script_importer() throws Exception {
        FlowDescriptionDriver flow = new FlowDescriptionDriver();
        In<Simple> in = flow.createIn("in1", new Import(Simple.class, "testing", null));
        Out<Simple> out = flow.createOut("out1", new Export(Simple.class, "testing", dummy()));

        FlowDescription desc = new IdentityFlow<Simple>(in, out);

        JobflowInfo info = compile(flow, desc);
        assertThat(info, is(nullValue()));
View Full Code Here

     * Exporter script is invalid.
     * @throws Exception if failed
     */
    @Test
    public void invalid_script_exporter() throws Exception {
        FlowDescriptionDriver flow = new FlowDescriptionDriver();
        In<Simple> in = flow.createIn("in1", new Import(Simple.class, "testing", dummy()));
        Out<Simple> out = flow.createOut("out1", new Export(Simple.class, "testing", null));

        FlowDescription desc = new IdentityFlow<Simple>(in, out);

        JobflowInfo info = compile(flow, desc);
        assertThat(info, is(nullValue()));
View Full Code Here

     * importer description w/o profile name.
     * @throws Exception if failed
     */
    @Test
    public void importer_wo_profile() throws Exception {
        FlowDescriptionDriver flow = new FlowDescriptionDriver();
        In<Simple> in = flow.createIn("in1", new Import(Simple.class, null, dummy()));
        Out<Simple> out = flow.createOut("out1", new Export(Simple.class, "testing", dummy()));

        FlowDescription desc = new IdentityFlow<Simple>(in, out);

        JobflowInfo info = compile(flow, desc);
        assertThat(info, nullValue());
View Full Code Here

     * importer description w/o profile name.
     * @throws Exception if failed
     */
    @Test
    public void importer_w_empty_profile() throws Exception {
        FlowDescriptionDriver flow = new FlowDescriptionDriver();
        In<Simple> in = flow.createIn("in1", new Import(Simple.class, "", dummy()));
        Out<Simple> out = flow.createOut("out1", new Export(Simple.class, "testing", dummy()));

        FlowDescription desc = new IdentityFlow<Simple>(in, out);

        JobflowInfo info = compile(flow, desc);
        assertThat(info, nullValue());
View Full Code Here

TOP

Related Classes of com.asakusafw.compiler.flow.FlowDescriptionDriver

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.