Package com.asakusafw.compiler.flow

Examples of com.asakusafw.compiler.flow.FlowDescriptionDriver


     * Columnsにない項目がTargetColumnsに含まれる。
     * @throws Exception 例外が発生した場合
     */
    @Test
    public void invalidNormalTargetColumns() throws Exception {
        FlowDescriptionDriver flow = new FlowDescriptionDriver();
        In<MockUnionModel> in = flow.createIn("in", new DirectImporterDescription(MockUnionModel.class, "a/a"));
        Out<MockUnionModel> out = flow.createOut("out", new DupCheckDbExporterDescription() {
            @Override
            public Class<?> getModelType() {
                return MockUnionModel.class;
            }
            @Override
View Full Code Here


     * Columnsにない項目がErrorColumnsに含まれる。
     * @throws Exception 例外が発生した場合
     */
    @Test
    public void invalidErrorTargetColumns() throws Exception {
        FlowDescriptionDriver flow = new FlowDescriptionDriver();
        In<MockUnionModel> in = flow.createIn("in", new DirectImporterDescription(MockUnionModel.class, "a/a"));
        Out<MockUnionModel> out = flow.createOut("out", new DupCheckDbExporterDescription() {
            @Override
            public Class<?> getModelType() {
                return MockUnionModel.class;
            }
            @Override
View Full Code Here

     * Columnsにない項目がTargetColumnsに含まれる。
     * @throws Exception 例外が発生した場合
     */
    @Test
    public void invalidCheckColumns() throws Exception {
        FlowDescriptionDriver flow = new FlowDescriptionDriver();
        In<MockUnionModel> in = flow.createIn("in", new DirectImporterDescription(MockUnionModel.class, "a/a"));
        Out<MockUnionModel> out = flow.createOut("out", new DupCheckDbExporterDescription() {
            @Override
            public Class<?> getModelType() {
                return MockUnionModel.class;
            }
            @Override
View Full Code Here

     * 補助インポーターを利用する正常系。
     * @throws Exception 例外が発生した場合
     */
    @Test
    public void using_secondary() throws Exception {
        FlowDescriptionDriver flow = new FlowDescriptionDriver();
        In<Ex1> in1 = flow.createIn("in1", new Import(Mode.PRIMARY, "default", LockType.CHECK));
        In<Ex1> in2 = flow.createIn("in2", new Import(Mode.SECONDARY, "secondary", LockType.UNUSED));
        Out<Ex1> out1 = flow.createOut("out1", new Export("default"));
        Out<Ex1> out2 = flow.createOut("out2", new Export("default"));
        FlowDescription desc = new DualIdentityFlow<Ex1>(in1, in2, out1, out2);

        JobflowInfo info = compile(flow, desc);
        assertThat(info, not(nullValue()));
        List<ExternalIoCommandProvider> commands = info.getCommandProviders();
View Full Code Here

     * インポーターが存在しない。
     * @throws Exception 例外が発生した場合
     */
    @Test
    public void no_primary_importers() throws Exception {
        FlowDescriptionDriver flow = new FlowDescriptionDriver();
        In<Ex1> in1 = flow.createIn("in1", new DirectImporterDescription(Ex1.class, "a/a"));
        Out<Ex1> out1 = flow.createOut("out1", new Export("primary"));
        FlowDescription desc = new IdentityFlow<Ex1>(in1, out1);

        JobflowInfo info = compile(flow, desc);
        assertThat(info, not(nullValue()));
        List<ExternalIoCommandProvider> commands = info.getCommandProviders();
View Full Code Here

     * エクスポーターが存在しない。
     * @throws Exception 例外が発生した場合
     */
    @Test
    public void no_exporters() throws Exception {
        FlowDescriptionDriver flow = new FlowDescriptionDriver();
        In<Ex1> in1 = flow.createIn("in1", new Import(Mode.PRIMARY, "primary", LockType.TABLE));
        Out<Ex1> out1 = flow.createOut("out1", new DirectExporterDescription(Ex1.class, "a/a-*"));
        FlowDescription desc = new IdentityFlow<Ex1>(in1, out1);

        JobflowInfo info = compile(flow, desc);
        assertThat(info, not(nullValue()));
        List<ExternalIoCommandProvider> commands = info.getCommandProviders();
View Full Code Here

     * エクスポーターが存在しない。
     * @throws Exception 例外が発生した場合
     */
    @Test
    public void only_secondary() throws Exception {
        FlowDescriptionDriver flow = new FlowDescriptionDriver();
        In<Ex1> in1 = flow.createIn("in1", new Import(Mode.SECONDARY, "secondary", LockType.UNUSED));
        Out<Ex1> out1 = flow.createOut("out1", new DirectExporterDescription(Ex1.class, "a/a-*"));
        FlowDescription desc = new IdentityFlow<Ex1>(in1, out1);

        JobflowInfo info = compile(flow, desc);
        assertThat(info, not(nullValue()));
        List<ExternalIoCommandProvider> commands = info.getCommandProviders();
View Full Code Here

     * 補助インポーターでロックを指定。
     * @throws Exception 例外が発生した場合
     */
    @Test
    public void lock_in_secondary() throws Exception {
        FlowDescriptionDriver flow = new FlowDescriptionDriver();
        In<Ex1> in1 = flow.createIn("in1", new Import(Mode.SECONDARY, "secondary", LockType.ROW));
        Out<Ex1> out1 = flow.createOut("out1", new Export("primary"));
        FlowDescription desc = new IdentityFlow<Ex1>(in1, out1);

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

     * プライマリインポーターの指定が複数ある。
     * @throws Exception 例外が発生した場合
     */
    @Test
    public void mutiple_primary() throws Exception {
        FlowDescriptionDriver flow = new FlowDescriptionDriver();
        In<Ex1> in1 = flow.createIn("in1", new Import(Mode.PRIMARY, "p1", LockType.ROW));
        In<Ex1> in2 = flow.createIn("in2", new Import(Mode.PRIMARY, "p2", LockType.ROW));
        Out<Ex1> out1 = flow.createOut("out1", new Export("p1"));
        Out<Ex1> out2 = flow.createOut("out2", new Export("p1"));
        FlowDescription desc = new DualIdentityFlow<Ex1>(in1, in2, out1, out2);

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

     * プライマリ以外でエクスポーターを起動する。
     * @throws Exception 例外が発生した場合
     */
    @Test
    public void inconsistent_exporter() throws Exception {
        FlowDescriptionDriver flow = new FlowDescriptionDriver();
        In<Ex1> in1 = flow.createIn("in1", new Import(Mode.PRIMARY, "a", LockType.ROW));
        In<Ex1> in2 = flow.createIn("in2", new Import(Mode.PRIMARY, "a", LockType.ROW));
        Out<Ex1> out1 = flow.createOut("out1", new Export("b"));
        Out<Ex1> out2 = flow.createOut("out2", new Export("b"));
        FlowDescription desc = new DualIdentityFlow<Ex1>(in1, in2, out1, out2);

        JobflowInfo info = compile(flow, desc);
        assertThat(info, is(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.