Package org.jgroups.protocols.pbcast

Examples of org.jgroups.protocols.pbcast.Merger$MergeTask


public class MergeTaskTest {
    @Test
    public void testNormalMerge() throws Exception {
        int[] first = new int[]{1, 5, 20, 40};
        int[] second = new int[]{0, 9, 20};
        MergeTask mt = new MergeTask(first, second);
        Assert.assertArrayEquals(new int[]{0, 1, 5, 9, 20, 20, 40}, mt.call());
    }
View Full Code Here


    }

    @Test(expected = NullPointerException.class)
    public void testMergeWithNull() {
        int[] second = new int[]{0, 9, 20};
        MergeTask mt = new MergeTask(null, second);
    }
View Full Code Here

    @Test
    public void testMergeWithEmpty() throws Exception {
        int[] first = new int[]{};
        int[] second = new int[]{0, 9, 20};
        MergeTask mt = new MergeTask(first, second);
        Assert.assertArrayEquals(new int[]{0, 9, 20}, mt.call());
        mt = new MergeTask(second, first);
        Assert.assertArrayEquals(new int[]{0, 9, 20}, mt.call());
    }
View Full Code Here

TOP

Related Classes of org.jgroups.protocols.pbcast.Merger$MergeTask

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.