What method of JUnit? assertTrue (or assertFalse) and use an array comparison. I think there's also some array compares built in to later JUnit versions, too.
Of course, it would be completely possible for a shuffled array to have the same order as the original.
Moving to the testing forum.
Joined: Jul 23, 2010
Well, OK. But what about general procedure? I can't use that approach because that is the only one array and there is no sense to compare it because the results will always be the same - arrays are equal.
Would it be OK to create a new array of the same type and size within a test class before any modifications with array and afterwards make comparisons using a copy of it?
Just in doubts is it a good practice to make any additional data in test methods...