Eclipse gives me a warning saying the method is deprecated assertEquals(Object[], Object[])by type Assert. I am using JUnit 4.
I wrote the following code in Eclipse:
import org.junit.Test;
import org.junit.Assert;
public class Generics {
public <T> T[] genericArraySwap(T[] list, int pos1, int pos2) throws IndexOutOfBoundsException {
...
}
@Test
public void genericArraySwapTest() {
Integer[] IntegerList = {0, 1, 2, 3, 4};
Assert.assertEquals(new Integer[] {0, 1, 2, 4, 3}, genericArraySwap(IntegerList, 3, 4));
}
}
Can someone tell me why this method is deprecated or which method should I use instead?
source
share