Updated the imports

This commit is contained in:
Vaibhav Sahay 2018-09-29 16:15:54 +05:30 committed by GitHub
parent 6a3eec15e5
commit 575dcc3840
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 26 additions and 25 deletions

View File

@ -1,25 +0,0 @@
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);
}
}

View File

@ -0,0 +1,26 @@
package com.baeldung.algorithms.mergesort;
import org.junit.Assert;
import org.junit.Test;
public class MergeSortUnitTest {
@Test
public void positiveTest() {
int[] actual = { 5, 1, 6, 2, 3, 4 };
int[] expected = { 1, 2, 3, 4, 5, 6 };
MergeSort.mergeSort(actual, actual.length);
Assert.assertArrayEquals(expected, actual);
}
@Test
public void negativeTest() {
int[] actual = { 5, 1, 6, 2, 3, 4 };
int[] expected = { 1, 2, 3, 4, 6, 5 };
MergeSort.mergeSort(actual, actual.length);
Assert.assertArrayEquals(expected, actual);
}
}