0
I need to compare two Lists,
assertEquals(lista1, lista2);
Assert.assertTrue(lista1.containsAll(lista2));
And the error the test shows is
(index:22 size:22) java.lang.Indexoutofboundsexception
Until today I had never tested a return List so I don’t know if I’m doing it right.
Thanks for the help I tested, keep giving error but I’ll see if I find another solution.
– Thiago16Oli
@Thiago16oli You can put the lists you are trying to test?
– Felipe Marinho
The problem is in the method that returned the list I tested with lists I created within the test and passed,so I will rewrite otherwise my code found a little better way to do it but thank you so much for the help.
– Thiago16Oli