UsefulTestCase.assertNotEmpty

This commit is contained in:
Anton Makeev
2014-01-28 16:32:19 +01:00
parent 299ca1f774
commit 89e5e5484a
@@ -604,6 +604,11 @@ public abstract class UsefulTestCase extends TestCase {
assertOrderedEquals(array);
}
public static void assertNotEmpty(final Collection<?> collection) {
if (collection == null) return;
assertTrue(!collection.isEmpty());
}
public static void assertEmpty(final Collection<?> collection) {
assertEmpty(collection.toString(), collection);
}