import static org.junit.Assert.*; import org.junit.Test; public class SelectionSortTest { @Test public void test() { int[] arr = new int[] {6, 1, 2, 8, 9, 3, 0, 5, 4, 7}; int[] expected = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9}; SelectionSort.sort(arr); for (int i = 0; i < arr.length; i++) { System.out.print(arr[i]); } assertArrayEquals(arr, expected); } @Test public void test_swap() { int[] arr = new int[] {1, 0}; int[] expected = {0, 1}; SelectionSort.swap(arr, 0, 1); assertArrayEquals(arr, expected); } }