Package org.marketcetera.util.test
Class CollectionAssert
- java.lang.Object
-
- org.marketcetera.util.test.CollectionAssert
-
public final class CollectionAssert extends Object
Assertions for collections.- Since:
- 0.5.0
- Version:
- $Id$
- Author:
- tlerios@marketcetera.com
-
-
Constructor Summary
Constructors Modifier Constructor Description privateCollectionAssert()Constructor.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <T> voidassertArrayPermutation(String message, T[] expected, T[] actual)Asserts that the two given arrays are permutations of each other.static <T> voidassertArrayPermutation(T[] expected, T[] actual)Asserts that the two given arrays are permutations of each other.
-
-
-
Method Detail
-
assertArrayPermutation
public static <T> void assertArrayPermutation(String message, T[] expected, T[] actual)
Asserts that the two given arrays are permutations of each other. This assertion holds if both arrays are null, or if they have one or more (but an equal number of) null elements. If the assertion does not hold, theAssertionErrorthrown starts with the given message, which may be null if no such custom message prefix is desired.- Type Parameters:
T- aTvalue- Parameters:
message- The identifying message.expected- The expected array.actual- The actual array.
-
assertArrayPermutation
public static <T> void assertArrayPermutation(T[] expected, T[] actual)Asserts that the two given arrays are permutations of each other. This assertion holds if both arrays are null, or if they have one or more (but an equal number of) null elements.- Type Parameters:
T- aTvalue- Parameters:
expected- The expected array.actual- The actual array.
-
-