diff --git a/BubbleSortTest b/BubbleSortTest new file mode 100644 index 0000000000000000000000000000000000000000..0b7ee9b798b48accc97e1d26cb932c67cf3d9d28 --- /dev/null +++ b/BubbleSortTest @@ -0,0 +1,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); + } +}