1 package org.opendaylight.controller.md.sal.binding.test;
3 import java.util.Collection;
6 import org.junit.Assert;
8 public class AssertCollections {
10 public static void assertEmpty(final Collection<?> set) {
11 Assert.assertTrue(set.isEmpty());
14 public static void assertEmpty(final Map<?,?> set) {
15 Assert.assertTrue(set.isEmpty());
18 public static void assertContains(final Collection<?> set, final Object... values) {
19 for (Object key : values) {
20 Assert.assertTrue(set.contains(key));
25 public static void assertNotContains(final Collection<?> set, final Object... values) {
26 for (Object key : values) {
27 Assert.assertFalse(set.contains(key));
31 public static void assertContains(final Map<?,?> map, final Object... values) {
32 for (Object key : values) {
33 Assert.assertTrue(map.containsKey(key));
37 public static void assertNotContains(final Map<?,?> map, final Object... values) {
38 for (Object key : values) {
39 Assert.assertFalse(map.containsKey(key));