| 1 | |
package net.sf.cotta.test.assertion; |
| 2 | |
|
| 3 | |
import java.util.Arrays; |
| 4 | |
import java.util.HashSet; |
| 5 | |
import java.util.List; |
| 6 | |
import java.util.Set; |
| 7 | |
|
| 8 | |
public class SetAssert<T> extends BaseAssert<Set<T>, SetAssert<T>> { |
| 9 | |
public SetAssert(Set<T> value) { |
| 10 | 1 | super(value); |
| 11 | 1 | } |
| 12 | |
|
| 13 | |
public SetAssert(List<T> value) { |
| 14 | 1 | this(value == null ? null : new HashSet<T>(value)); |
| 15 | 1 | } |
| 16 | |
|
| 17 | |
public SetAssert<T> eq(T... values) { |
| 18 | 0 | eq(new HashSet<T>(Arrays.asList(values))); |
| 19 | 0 | return this; |
| 20 | |
} |
| 21 | |
} |