Package kalashnikov.dmitry.lab3

Examples of kalashnikov.dmitry.lab3.Dispatcher.sort()


*/
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());
    }

    @Test
View Full Code Here


    @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());
    }

    @Test
    public void testDispatcherNormal3Threads() throws InterruptedException, ExecutionException, IOException {
        Dispatcher dispatcher = new Dispatcher("multicoreTest.txt", 3);
View Full Code Here

    }

    @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());
    }

    @Test
View Full Code Here

    @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());
    }

    @Test
    public void testDispatcherNormal4Threads() throws InterruptedException, ExecutionException, IOException {
        Dispatcher dispatcher = new Dispatcher("multicoreTest.txt", 4);
View Full Code Here

    }

    @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

    @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

TOP
Copyright © 2018 www.massapi.com. 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.