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

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


        Rendezvous<Writable> f = (Rendezvous<Writable>) create(loader, name, mapper.toArguments());

        Segment segment = stage.getShuffleModel().findSegment(fragment.getInputPorts().get(0));
        SegmentedWritable value = createShuffleValue(loader, stage);

        Ex1 ex1 = new Ex1();
        ex1.setStringAsString("string");

        f.begin();
        ex1.setValue(10);
        setShuffleValue(segment, value, ex1);
        f.process(value);
        ex1.setValue(20);
        setShuffleValue(segment, value, ex1);
        f.process(value);
        ex1.setValue(30);
        setShuffleValue(segment, value, ex1);
        f.process(value);
        ex1.setValue(40);
        setShuffleValue(segment, value, ex1);
        f.process(value);
        f.end();

        assertThat(result.getResults().size(), is(1));
View Full Code Here


        MockResult<Ex1> orig = mapper.create("original");

        @SuppressWarnings("unchecked")
        Result<Ex1> f = (Result<Ex1>) create(loader, name, mapper.toArguments());

        Ex1 ex1 = new Ex1();
        ex1.setValue(100);
        f.add(ex1);

        assertThat(out.getResults().size(), is(1));
        assertThat(out.getResults().get(0).getValue(), is(101));
View Full Code Here

        MockResult<Ex1> orig = mapper.create("original");

        @SuppressWarnings("unchecked")
        Result<Ex1> f = (Result<Ex1>) create(loader, name, mapper.toArguments());

        Ex1 ex1 = new Ex1();
        ex1.setValue(100);
        f.add(ex1);

        assertThat(out.getResults().size(), is(1));
        assertThat(out.getResults().get(0).getValue(), is(110));
View Full Code Here

        MockResult<Ex1> out1 = mapper.create("r1");

        @SuppressWarnings("unchecked")
        Result<Ex1> f = (Result<Ex1>) create(loader, name, mapper.toArguments());

        Ex1 ex1 = new Ex1();
        ex1.setValue(100);
        f.add(ex1);

        assertThat(out1.getResults().size(), is(1));
        assertThat(out1.getResults().get(0).getValue(), is(101));
    }
View Full Code Here

        MockResult<Ex2> out2 = mapper.create("r2");

        @SuppressWarnings("unchecked")
        Result<Ex1> f = (Result<Ex1>) create(loader, name, mapper.toArguments());

        Ex1 ex1 = new Ex1();
        ex1.setValue(100);
        f.add(ex1);

        assertThat(out1.getResults().size(), is(1));
        assertThat(out1.getResults().get(0).getValue(), is(101));
View Full Code Here

        MockResult<Ex1> out3 = mapper.create("r3");

        @SuppressWarnings("unchecked")
        Result<Ex1> f = (Result<Ex1>) create(loader, name, mapper.toArguments());

        Ex1 ex1 = new Ex1();
        ex1.setValue(100);
        f.add(ex1);

        assertThat(out1.getResults().size(), is(1));
        assertThat(out1.getResults().get(0).getValue(), is(101));
View Full Code Here

        MockResult<Ex2> out2 = mapper.create("r1");

        @SuppressWarnings("unchecked")
        Result<Ex1> f = (Result<Ex1>) create(loader, name, mapper.toArguments());

        Ex1 ex1 = new Ex1();
        ex1.setValue(100);
        f.add(ex1);

        assertThat(out2.getResults().size(), is(1));
        assertThat(out2.getResults().get(0).getValue(), is(200));
    }
View Full Code Here

        Segment seg1 = segments.get(0);
        Segment seg2 = segments.get(1);
        assertThat(seg1.getTerms().size(), is(2));
        assertThat(seg2.getTerms().size(), is(2));

        Ex1 ex1 = new Ex1();
        ex1.setSid(1);
        ex1.setValue(100);
        ex1.setStringAsString("ex1");
        setShuffleValue(seg1, value, ex1);

        assertThat(value.getSegmentId(), is(seg1.getPortId()));
        Object r1 = getShuffleValue(seg1, value);
        assertThat(r1, is((Object) ex1));
View Full Code Here

    private void withParameterEx1(
            Ex1 a1,
            Result<Ex1> r1,
            int parameter) {
        Ex1 copy = new Ex1();
        copy.setSidOption(a1.getSidOption());
        copy.setStringOption(a1.getStringOption());
        copy.setValue(a1.getValue() + parameter);
        r1.add(copy);
    }
View Full Code Here

                name.getQualifiedName(),
                result);
        Writable key = (Writable) create(loader, shuffle.getCompiled().getKeyTypeName());
        Writable value = (Writable) create(loader, shuffle.getCompiled().getValueTypeName());

        Ex1 orig = new Ex1();
        orig.setValueOption(new IntOption().modify(100));
        ExSummarized model = new ExSummarized();
        model.setValue(100);
        model.setCount(1);

        invoke(key, Naming.getShuffleKeySetter(1), model);
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.