aboutsummaryrefslogtreecommitdiff
path: root/comp2511/blackout/tests/TestHelpers.java
blob: 913784b605b40724b6b188c15bd76f98b17f232b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
package blackout;

import static org.junit.jupiter.api.Assertions.assertArrayEquals;

import java.util.Collections;
import java.util.List;

public class TestHelpers {
    public static<T extends Comparable<? super T>> void assertListAreEqualIgnoringOrder(List<T> a, List<T> b) {
        Collections.sort(a);
        Collections.sort(b);
        assertArrayEquals(a.toArray(), b.toArray());
    }
}