-1

so i need to determine if an Integer[] expResult is equal to an Integer[] result, i tried to use assertTrue and assertEquals but they will not work.. if someone could help me it would be very nice! thanks

2 Answers2

2

You can use assertArrayEquals like:

Assert.assertArrayEquals(new int[]{1,2,3},new int[]{1,2,3});
Adam Williams
  • 1,712
  • 3
  • 17
  • 30
Ebbe M. Pedersen
  • 7,250
  • 3
  • 27
  • 47
0

You can do it as

Assert.assertEquals(Arrays.asList(a), Arrays.asList(b));
Francisco Hernandez
  • 2,378
  • 14
  • 18