141516171819202122
String[] str = new String[4]; str[0] = "4"; str[1] = "1"; str[2] = "3"; str[3] = "2"; SortTask st = new SortTask(str); int[] res = st.call(); Assert.assertArrayEquals(new int[]{1, 2, 3, 4}, res); }
262728293031323334
String[] str = new String[4]; str[0] = "4"; str[1] = null; str[2] = "3"; str[3] = "2"; SortTask st = new SortTask(str); int[] res = st.call(); Assert.assertArrayEquals(new int[]{1, 2, 3, 4}, res); }
343536373839404142
} @Test public void testSortTaskEmpty() throws Exception { String[] str = new String[0]; SortTask st = new SortTask(str); int[] res = st.call(); Assert.assertArrayEquals(new int[]{}, res); }