Package com.asakusafw.compiler.flow.testing.model

Examples of com.asakusafw.compiler.flow.testing.model.Ex1


        environment.getOptions().setEnableCombiner(combine);

        TestInput<Ex1> in = tester.input(Ex1.class, "Ex1");
        TestOutput<KeyConflict> summarized = tester.output(KeyConflict.class, "summarized");

        Ex1 ex1 = new Ex1();

        ex1.setStringAsString("a");
        ex1.setSid(1);
        in.add(ex1);

        ex1.setSid(2);
        in.add(ex1);

        ex1.setStringAsString("b");
        ex1.setSid(3);
        in.add(ex1);

        ex1.setSid(4);
        in.add(ex1);

        ex1.setSid(5);
        in.add(ex1);

        assertThat(tester.runFlow(new SummarizeFlowKeyConflict(
                in.flow(), summarized.flow())), is(true));
View Full Code Here


        TestInput<Ex1> in1 = tester.input(Ex1.class, "ex1");
        TestInput<Ex2> in2 = tester.input(Ex2.class, "ex2", dataSize);
        TestOutput<Ex1> found = tester.output(Ex1.class, "found");
        TestOutput<Ex1> missing = tester.output(Ex1.class, "missing");

        Ex1 ex1 = new Ex1();
        Ex2 ex2 = new Ex2();

        ex2.setStringAsString("both");
        ex2.setSid(10);
        in2.add(ex2);
        ex1.setStringAsString("both");
        ex1.setSid(1);
        in1.add(ex1);

        ex2.setStringAsString("only-master");
        ex2.setSid(20);
        in2.add(ex2);
        ex1.setStringAsString("only-tx");
        ex1.setSid(2);
        in1.add(ex1);
        ex1.setStringAsString("only-tx");
        ex1.setSid(3);
        in1.add(ex1);

        ex2.setStringAsString("multi-tx");
        ex2.setSid(30);
        in2.add(ex2);
        ex1.setStringAsString("multi-tx");
        ex1.setSid(4);
        in1.add(ex1);
        ex1.setStringAsString("multi-tx");
        ex1.setSid(5);
        in1.add(ex1);
        ex1.setStringAsString("multi-tx");
        ex1.setSid(6);
        in1.add(ex1);

        assertThat(tester.runFlow(new MasterJoinUpdateFlowSimple(
                in1.flow(), in2.flow(),
                found.flow(), missing.flow())), is(true));
View Full Code Here

        TestInput<Ex1> in1 = tester.input(Ex1.class, "ex1");
        TestInput<Ex2> in2 = tester.input(Ex2.class, "ex2", dataSize);
        TestOutput<Ex1> found = tester.output(Ex1.class, "found");
        TestOutput<Ex1> missing = tester.output(Ex1.class, "missing");

        Ex1 ex1 = new Ex1();
        Ex2 ex2 = new Ex2();

        ex2.setStringAsString("both");
        ex2.setSid(10);
        in2.add(ex2);
        ex1.setStringAsString("both");
        ex1.setSid(1);
        in1.add(ex1);

        ex2.setStringAsString("only-master");
        ex2.setSid(20);
        in2.add(ex2);
        ex1.setStringAsString("only-tx");
        ex1.setSid(2);
        in1.add(ex1);
        ex1.setStringAsString("only-tx");
        ex1.setSid(3);
        in1.add(ex1);

        ex2.setStringAsString("multi-tx");
        ex2.setSid(30);
        in2.add(ex2);
        ex1.setStringAsString("multi-tx");
        ex1.setSid(4);
        in1.add(ex1);
        ex1.setStringAsString("multi-tx");
        ex1.setSid(5);
        in1.add(ex1);
        ex1.setStringAsString("multi-tx");
        ex1.setSid(6);
        in1.add(ex1);

        assertThat(tester.runFlow(new MasterJoinUpdateFlowWithParameter(
                in1.flow(), in2.flow(),
                found.flow(), missing.flow())), is(true));
View Full Code Here

        TestInput<Ex1> in1 = tester.input(Ex1.class, "ex1");
        TestInput<Ex2> in2 = tester.input(Ex2.class, "ex2", dataSize);
        TestOutput<Ex1> found = tester.output(Ex1.class, "found");
        TestOutput<Ex1> missing = tester.output(Ex1.class, "missing");

        Ex1 ex1 = new Ex1();
        Ex2 ex2 = new Ex2();

        ex2.setStringAsString("both");
        ex2.setSid(110);
        ex2.setValue(10);
        in2.add(ex2);
        ex2.setSid(111);
        ex2.setValue(11);
        in2.add(ex2);
        ex1.setStringAsString("both");
        ex1.setValue(11);
        ex1.setSid(11);
        in1.add(ex1);

        ex2.setStringAsString("only-master");
        ex2.setSid(120);
        ex2.setValue(20);
        in2.add(ex2);
        ex2.setSid(121);
        ex2.setValue(21);
        in2.add(ex2);
        ex1.setStringAsString("only-master");
        ex1.setValue(22);
        ex1.setSid(22);
        in1.add(ex1);
        ex1.setValue(23);
        ex1.setSid(23);
        in1.add(ex1);

        ex2.setStringAsString("multi-tx");
        ex2.setSid(134);
        ex2.setValue(34);
        in2.add(ex2);
        ex2.setSid(135);
        ex2.setValue(35);
        in2.add(ex2);
        ex1.setStringAsString("multi-tx");
        ex1.setValue(34);
        ex1.setSid(34);
        in1.add(ex1);
        ex1.setValue(35);
        ex1.setSid(35);
        in1.add(ex1);
        ex1.setValue(36);
        ex1.setSid(36);
        in1.add(ex1);

        assertThat(tester.runFlow(new MasterJoinUpdateFlowSelection(
                in1.flow(), in2.flow(),
                found.flow(), missing.flow())), is(true));
View Full Code Here

                DirectFlowCompiler.toLibraryPath(Ex1.class),
        });
        TestInput<Ex1> in = tester.input(Ex1.class, "ex1");
        TestOutput<Ex1> out = tester.output(Ex1.class, "ex1");

        Ex1 ex1 = new Ex1();
        ex1.setSid(0);
        ex1.setValue(10);
        in.add(ex1);
        ex1.setSid(1);
        ex1.setValue(20);
        in.add(ex1);

        JobflowInfo info = DirectFlowCompiler.compile(
                tester.analyzeFlow(new StraightRendezvousFragments(in.flow(), out.flow())),
                "simple",
View Full Code Here

    @Test
    public void simple() throws Exception {
        BatchInfo info = tester.compileBatch(SimpleBatch.class);
        ModelOutput<Ex1> output = tester.openOutput(Ex1.class, tester.getImporter(info, "x"));

        Ex1 ex1 = new Ex1();
        ex1.setSid(100);
        ex1.setValue(100);
        output.write(ex1);
        ex1.setSid(300);
        ex1.setValue(300);
        output.write(ex1);
        ex1.setSid(200);
        ex1.setValue(200);
        output.write(ex1);
        output.close();

        assertThat(tester.run(info), is(true));
View Full Code Here

    @Test
    public void ordered() throws Exception {
        BatchInfo info = tester.compileBatch(OrderedBatch.class);
        ModelOutput<Ex1> output = tester.openOutput(Ex1.class, tester.getImporter(info, "first"));

        Ex1 ex1 = new Ex1();
        ex1.setValue(100);
        output.write(ex1);
        output.close();

        assertThat(tester.run(info), is(true));
View Full Code Here

    @Test
    public void join() throws Exception {
        BatchInfo info = tester.compileBatch(JoinBatch.class);
        ModelOutput<Ex1> output = tester.openOutput(Ex1.class, tester.getImporter(info, "first"));

        Ex1 ex1 = new Ex1();
        ex1.setValue(100);
        output.write(ex1);
        output.close();

        assertThat(tester.run(info), is(true));
View Full Code Here

        TestInput<Ex1> in1 = tester.input(Ex1.class, "Ex1", dataSize);
        TestInput<Ex2> in2 = tester.input(Ex2.class, "ex2");
        TestOutput<ExJoined> joined = tester.output(ExJoined.class, "joined");
        TestOutput<Ex2> missing = tester.output(Ex2.class, "missing");

        Ex1 ex1 = new Ex1();
        Ex2 ex2 = new Ex2();

        ex1.setValue(10);
        in1.add(ex1);
        ex2.setValue(10);
        ex2.setSid(1);
        in2.add(ex2);

        ex1.setValue(20);
        in1.add(ex1);
        ex2.setValue(21);
        ex2.setSid(2);
        in2.add(ex2);
        ex2.setValue(22);
        ex2.setSid(3);
        in2.add(ex2);

        ex1.setValue(30);
        in1.add(ex1);
        ex2.setValue(30);
        ex2.setSid(4);
        in2.add(ex2);
        ex2.setValue(30);
View Full Code Here

        TestInput<Ex1> in1 = tester.input(Ex1.class, "Ex1", dataSize);
        TestInput<Ex2> in2 = tester.input(Ex2.class, "ex2");
        TestOutput<ExJoined2> joined = tester.output(ExJoined2.class, "joined");
        TestOutput<Ex2> missing = tester.output(Ex2.class, "missing");

        Ex1 ex1 = new Ex1();
        Ex2 ex2 = new Ex2();

        ex1.setValue(10);
        in1.add(ex1);
        ex2.setValue(10);
        ex2.setSid(1);
        in2.add(ex2);

        ex1.setValue(20);
        in1.add(ex1);
        ex2.setValue(21);
        ex2.setSid(2);
        in2.add(ex2);
        ex2.setValue(22);
        ex2.setSid(3);
        in2.add(ex2);

        ex1.setValue(30);
        in1.add(ex1);
        ex2.setValue(30);
        ex2.setSid(4);
        in2.add(ex2);
        ex2.setValue(30);
View Full Code Here

TOP

Related Classes of com.asakusafw.compiler.flow.testing.model.Ex1

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.