Skip to content

Commit 7d03f03

Browse files
authored
Merge pull request eugenp#5408 from eugenp/BAEL-2212
fix unit test
2 parents d385e7b + ed2a285 commit 7d03f03

1 file changed

Lines changed: 4 additions & 5 deletions

File tree

algorithms/src/test/java/algorithms/insertionsort/InsertionSortUnitTest.java renamed to algorithms/src/test/java/com/baeldung/algorithms/insertionsort/InsertionSortUnitTest.java

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package algorithms.insertionsort;
1+
package com.baeldung.algorithms.insertionsort;
22

33
import com.baeldung.algorithms.insertionsort.InsertionSort;
44
import org.junit.Test;
@@ -8,17 +8,16 @@
88
public class InsertionSortUnitTest {
99

1010
@Test
11-
public void givenUnsortedArray_whenInsertionSortImperatively_thenItIsSortedInAscendingOrder() {
11+
public void givenUnsortedArray_whenInsertionSortImperative_thenSortedAsc() {
1212
int[] input = {6, 2, 3, 4, 5, 1};
1313
InsertionSort.insertionSortImperative(input);
1414
int[] expected = {1, 2, 3, 4, 5, 6};
1515
assertArrayEquals("the two arrays are not equal", expected, input);
1616
}
1717

1818
@Test
19-
public void givenUnsortedArray_whenInsertionSortRecursively_thenItIsSortedInAscendingOrder() {
20-
// int[] input = {6, 4, 5, 2, 3, 1};
21-
int[] input = {6, 4};
19+
public void givenUnsortedArray_whenInsertionSortRecursive_thenSortedAsc() {
20+
int[] input = {6, 4, 5, 2, 3, 1};
2221
InsertionSort.insertionSortRecursive(input);
2322
int[] expected = {1, 2, 3, 4, 5, 6};
2423
assertArrayEquals("the two arrays are not equal", expected, input);

0 commit comments

Comments
 (0)