@Test public void threeElementArrayWithDuplicatedValueLowerThanPivot() { assertThat(IntegerSort.sort(new int[] {4, 5, 4}), is(equalTo(new int[] {4, 4, 5}))); }
@Test public void sixElementArray() { assertThat( IntegerSort.sort(new int[] {4, 5, 4, 5, 5, 4}), is(equalTo(new int[] {4, 4, 4, 5, 5, 5}))); }
@Test public void fiveElementArrayFirstTwoNeedsSorting() { assertThat(IntegerSort.sort(new int[] {4, 3, 5, 6, 7}), is(equalTo(new int[] {3, 4, 5, 6, 7}))); }
@Test public void emptyArrayReturnsEmptyArray() { assertThat(IntegerSort.sort(new int[0]), is(equalTo(new int[0]))); }
@Test public void sevenElementArrayReturnsSorted() { assertThat( IntegerSort.sort(new int[] {9, 8, 7, 6, 5, 4, 3}), is(equalTo(new int[] {3, 4, 5, 6, 7, 8, 9}))); }
@Test public void threeElementArrayMovesLeftPointer() { assertThat(IntegerSort.sort(new int[] {4, 6, 5}), is(equalTo(new int[] {4, 5, 6}))); }
@Test public void fiveElementArrayReturnsSorted() { assertThat(IntegerSort.sort(new int[] {3, 6, 5, 4, 7}), is(equalTo(new int[] {3, 4, 5, 6, 7}))); }
@Test public void threeElementArrayReturnsSorted() { assertThat(IntegerSort.sort(new int[] {6, 5, 4}), is(equalTo(new int[] {4, 5, 6}))); }
@Test public void twoElementSortedArrayReturnsItself() { assertThat(IntegerSort.sort(new int[] {5, 6}), is(equalTo(new int[] {5, 6}))); }
@Test public void twoElementArrayIsReturnedSorted() { assertThat(IntegerSort.sort(new int[] {6, 5}), is(equalTo(new int[] {5, 6}))); }
@Test public void singleElementArrayReturnsItself() { assertThat(IntegerSort.sort(new int[] {5}), is(equalTo(new int[] {5}))); }