initial commit
This commit is contained in:
parent
191b27a8c5
commit
5db1d97f8f
|
@ -0,0 +1,26 @@
|
|||
package com.baeldung.algorithms.mergesort;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.*;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
|
||||
class MergeSortTest {
|
||||
|
||||
@Test
|
||||
void positiveTest() {
|
||||
int[] input = { 5, 1, 6, 2, 3, 4 };
|
||||
int[] expected = { 1, 2, 3, 4, 5, 6 };
|
||||
MergeSort.mergeSort(input, input.length);
|
||||
assertArrayEquals(expected, input);
|
||||
}
|
||||
|
||||
@Test
|
||||
void negativeTest() {
|
||||
int[] input = { 5, 1, 6, 2, 3, 4 };
|
||||
int[] expected = { 1, 2, 3, 4, 6 ,5};
|
||||
MergeSort.mergeSort(input, input.length);
|
||||
assertArrayEquals(expected, input);
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in New Issue