BubbleSortTest 909 Bytes
Newer Older
Younis's avatar
Younis committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
import static org.junit.Assert.assertArrayEquals;
import org.junit.Test;

public class BubbleSortTest{

    @Test
    public void testBubbleSortStudent1() {
        int[] inputArray = {5, 90, 35, 150, 45, 3};
        int[] expectedOutput = {3, 5, 35, 45, 90, 150};
        BubbleSortStudent1.sort(inputArray);
        assertArrayEquals(expectedOutput, inputArray);
    }

    @Test
    public void testBubbleSortStudent2() {
        int[] inputArray = {5, 90, 35, 150, 45, 3};
        int[] expectedOutput = {3, 5, 35, 45, 90, 150};
        BubbleSortStudent2.sort(inputArray);
        assertArrayEquals(expectedOutput, inputArray);
    }

    @Test
    public void testBubbleSortStudent3() {
        int[] inputArray = {5, 90, 35, 150, 45, 3};
        int[] expectedOutput = {3, 5, 35, 45, 90, 150};
        BubbleSortStudent3.sort(inputArray);
        assertArrayEquals(expectedOutput, inputArray);
    }
}