Package org.jitterbit.ui.selection

Examples of org.jitterbit.ui.selection.SelectionSourceConverter$Dispatcher


* Created by Tronok on 29.04.14.
*/
public class DispatcherTest {
    @Test
    public void testDispatcherNormal2Threads() throws InterruptedException, ExecutionException, IOException {
        Dispatcher dispatcher = new Dispatcher("multicoreTest.txt", 2);
        Assert.assertArrayEquals(new int[]{1, 2, 2, 3, 5, 5, 6, 8, 9, 34}, dispatcher.sort());
        dispatcher = new Dispatcher("multicoreTest_1_by_1.txt", 2);
        Assert.assertArrayEquals(new int[]{1, 2, 2, 3, 5, 5, 6, 8, 9, 34}, dispatcher.sort());
    }
View Full Code Here


        Assert.assertArrayEquals(new int[]{1, 2, 2, 3, 5, 5, 6, 8, 9, 34}, dispatcher.sort());
    }

    @Test
    public void testDispatcherNormal3Threads() throws InterruptedException, ExecutionException, IOException {
        Dispatcher dispatcher = new Dispatcher("multicoreTest.txt", 3);
        Assert.assertArrayEquals(new int[]{1, 2, 2, 3, 5, 5, 6, 8, 9, 34}, dispatcher.sort());
        dispatcher = new Dispatcher("multicoreTest_1_by_1.txt", 3);
        Assert.assertArrayEquals(new int[]{1, 2, 2, 3, 5, 5, 6, 8, 9, 34}, dispatcher.sort());
    }
View Full Code Here

        Assert.assertArrayEquals(new int[]{1, 2, 2, 3, 5, 5, 6, 8, 9, 34}, dispatcher.sort());
    }

    @Test
    public void testDispatcherNormal4Threads() throws InterruptedException, ExecutionException, IOException {
        Dispatcher dispatcher = new Dispatcher("multicoreTest.txt", 4);
        Assert.assertArrayEquals(new int[]{1, 2, 2, 3, 5, 5, 6, 8, 9, 34}, dispatcher.sort());
        dispatcher = new Dispatcher("multicoreTest_1_by_1.txt", 4);
        Assert.assertArrayEquals(new int[]{1, 2, 2, 3, 5, 5, 6, 8, 9, 34}, dispatcher.sort());
    }
View Full Code Here

        removeMemberAction.setReadOnly(readOnly);
        descriptionAction.setEnabled(editable);
    }

    private SelectionSource getMemberSelectionSource() {
        return new SelectionSourceConverter(memberList.asSelectionSource(), new SelectionConverter() {

            @Override
            public Object fromSelection(Object o) {
                return new GroupMember((User) o, group);
            }
View Full Code Here

            }
        }
    }

    private SelectionSource getGroupSelectionSource() {
        return new SelectionSourceConverter(groupList.asSelectionSource(), new SelectionConverter() {

            @Override
            public Object fromSelection(Object o) {
                return new GroupMember(user, ((GroupListUi) o).getGroup());
            }
View Full Code Here

TOP

Related Classes of org.jitterbit.ui.selection.SelectionSourceConverter$Dispatcher

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.