Package com.alibaba.citrus.service.pipeline.valve

Examples of com.alibaba.citrus.service.pipeline.valve.LogAndInvokeSubValve


    }

    @Test
    public void invoke_subPipeline() throws Exception {
        Pipeline p3 = createPipeline(new LogValve(), new LogValve(), new LogValve());
        Pipeline p2 = createPipeline(new LogValve(), new LogAndInvokeSubValve(p3), new LogValve());
        pipeline = createPipeline(new LogValve(), new LogAndInvokeSubValve(p2), new LogValve());

        // invoke
        assertInvoke(pipeline, false);
        assertLog("1-1", "1-2", "2-1", "2-2", "3-1", "3-2", "3-3", "2-3", "1-3");
    }
View Full Code Here


    }

    @Test
    public void break_levels_outOfBounds() throws Exception {
        PipelineImpl p3 = createPipeline(new LogValve(), new LogValve(), new LogValve());
        PipelineImpl p2 = createPipeline(new LogValve(), new LogAndInvokeSubValve(p3), new LogValve());
        pipeline = createPipeline(new LogValve(), new LogAndInvokeSubValve(p2), new LogValve());

        // break levels=3
        p3.getValves()[1] = new LogAndBreakValve(3);

        try {
View Full Code Here

    }

    @Test
    public void break_levels() throws Exception {
        PipelineImpl p3 = createPipeline(new LogValve(), new LogValve(), new LogValve());
        PipelineImpl p2 = createPipeline(new LogValve(), new LogAndInvokeSubValve(p3), new LogValve());
        pipeline = createPipeline(new LogValve(), new LogAndInvokeSubValve(p2), new LogValve());

        // break levels=2
        p3.getValves()[1] = new LogAndBreakValve(2);
        assertInvoke(pipeline, true);
        assertLog("1-1", "1-2", "2-1", "2-2", "3-1", "3-2"/* break */);
 
View Full Code Here

    }

    @Test
    public void break_label_NotFound() throws Exception {
        PipelineImpl p3 = createPipeline(new LogValve(), new LogAndBreakValve(" mylabel "), new LogValve());
        PipelineImpl p2 = createPipeline(new LogValve(), new LogAndInvokeSubValve(p3), new LogValve());
        pipeline = createPipeline(new LogValve(), new LogAndInvokeSubValve(p2), new LogValve());

        pipeline.setLabel("mylabel2");

        // invoke
        try {
View Full Code Here

    }

    @Test
    public void break_label() throws Exception {
        PipelineImpl p3 = createPipeline(new LogValve(), new LogAndBreakValve(" mylabel "), new LogValve());
        PipelineImpl p2 = createPipeline(new LogValve(), new LogAndInvokeSubValve(p3), new LogValve());
        pipeline = createPipeline(new LogValve(), new LogAndInvokeSubValve(p2), new LogValve());

        // levels = 2
        pipeline.setLabel("mylabel");
        assertInvoke(pipeline, true);
        assertLog("1-1", "1-2", "2-1", "2-2", "3-1", "3-2"/* break */);
 
View Full Code Here

    }

    @Test
    public void break_toTop() throws Exception {
        PipelineImpl p3 = createPipeline(new LogValve(), new LogAndBreakValve(" #TOP "), new LogValve());
        PipelineImpl p2 = createPipeline(new LogValve(), new LogAndInvokeSubValve(p3), new LogValve());
        pipeline = createPipeline(new LogValve(), new LogAndInvokeSubValve(p2), new LogValve());

        // levels = 2
        assertInvoke(pipeline, true);
        assertLog("1-1", "1-2", "2-1", "2-2", "3-1", "3-2"/* break */);
    }
View Full Code Here

TOP

Related Classes of com.alibaba.citrus.service.pipeline.valve.LogAndInvokeSubValve

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.