From 89e5e5484aa064857ee482b7e7657bfc72af3110 Mon Sep 17 00:00:00 2001 From: Anton Makeev Date: Tue, 28 Jan 2014 16:27:03 +0100 Subject: [PATCH] UsefulTestCase.assertNotEmpty --- .../src/com/intellij/testFramework/UsefulTestCase.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/platform/testFramework/src/com/intellij/testFramework/UsefulTestCase.java b/platform/testFramework/src/com/intellij/testFramework/UsefulTestCase.java index 7a38cc27e641..d7e6e5a42ec4 100644 --- a/platform/testFramework/src/com/intellij/testFramework/UsefulTestCase.java +++ b/platform/testFramework/src/com/intellij/testFramework/UsefulTestCase.java @@ -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); }