Use org.junit.Assert‘s method assertArrayEquals
:
import org.junit.Assert;
...
Assert.assertArrayEquals( expectedResult, result );
If this method is not available, you may have accidentally imported the Assert class from junit.framework
.
More Related Contents:
- assert vs. JUnit Assertions
- AssertEquals 2 Lists ignore order
- How do I use multidimensional arrays? [closed]
- Java sort 4 arrays into 1 array
- I keep getting java.lang.ArrayIndexOutOfBoundsException: 5! How do I fix this? [closed]
- Converting array string to arraylist without nesting it in Java
- Creating a program to file criminal cases and then view them, with new case being allowed to add
- Take a result of two long numbers using an array in Java [closed]
- Incrementing an array [closed]
- How can I concatenate two arrays in Java?
- How to initialize an array in Java?
- How to mock a final class with mockito
- JSON Array iteration in Android/Java
- Java Comparator class to sort arrays
- Assert equals between 2 Lists in Junit
- Converting an array of objects to an array of their primitive types
- Java: join array of primitives with separator
- Time dependent unit tests
- How do I ignore certain elements when comparing XML?
- Generics, arrays, and the ClassCastException
- Pascal’s triangle 2d array – formatting printed output
- Split a String at every 3rd comma in Java
- The easiest way to transform collection to array?
- How to define a JUnit method rule in a test suite?
- How to intercept SLF4J (with logback) logging via a JUnit test?
- Is it possible in Java to override ‘toString’ for an Objects array?
- Excluding a non param test in parameterized test class
- How to convert JSONArray to List with Gson?
- How to add an element to Array and shift indexes?
- How does Eclipse actually run Junit tests?