aboutsummaryrefslogtreecommitdiffstats
path: root/models-pap/src/test
diff options
context:
space:
mode:
authorJim Hahn <jrh3@att.com>2019-10-17 14:58:59 -0400
committerJim Hahn <jrh3@att.com>2019-10-17 14:58:59 -0400
commitdc182bf477bc1d749abd5102f90f666bca45e37e (patch)
tree4823bcc0a4abb6c4a38aa291219b3d9c0396417a /models-pap/src/test
parent9c2c12756735b0354de68903bbba7bfb55d56863 (diff)
Add PolicyNotification.isEmpty() method
Change-Id: I5cf5f21b968975018bd1f18daa1653289b837d2e Issue-ID: POLICY-1841 Signed-off-by: Jim Hahn <jrh3@att.com>
Diffstat (limited to 'models-pap/src/test')
-rw-r--r--models-pap/src/test/java/org/onap/policy/models/pap/concepts/PolicyNotificationTest.java12
1 files changed, 12 insertions, 0 deletions
diff --git a/models-pap/src/test/java/org/onap/policy/models/pap/concepts/PolicyNotificationTest.java b/models-pap/src/test/java/org/onap/policy/models/pap/concepts/PolicyNotificationTest.java
index 3c7b0cab6..10c7c5fee 100644
--- a/models-pap/src/test/java/org/onap/policy/models/pap/concepts/PolicyNotificationTest.java
+++ b/models-pap/src/test/java/org/onap/policy/models/pap/concepts/PolicyNotificationTest.java
@@ -19,9 +19,12 @@
package org.onap.policy.models.pap.concepts;
import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertSame;
+import static org.junit.Assert.assertTrue;
import java.util.Arrays;
+import java.util.Collections;
import java.util.List;
import org.junit.Test;
import org.onap.policy.common.utils.coder.CoderException;
@@ -56,5 +59,14 @@ public class PolicyNotificationTest {
// test equals() method (and verify encode/decode worked)
assertEquals(notify, notify2);
+
+ /*
+ * Test isEmpty()
+ */
+ assertFalse(notify.isEmpty());
+ assertFalse(notify2.isEmpty());
+ assertTrue(new PolicyNotification().isEmpty());
+ assertFalse(new PolicyNotification(add, Collections.emptyList()).isEmpty());
+ assertFalse(new PolicyNotification(Collections.emptyList(), del).isEmpty());
}
}