2 * Copyright (c) 2014, 2015 Cisco Systems, Inc. and others. All rights reserved.
4 * This program and the accompanying materials are made available under the
5 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6 * and is available at http://www.eclipse.org/legal/epl-v10.html
9 package org.opendaylight.controller.md.sal.binding.test;
11 import java.util.Collection;
13 import org.junit.Assert;
16 public final class AssertCollections {
17 private AssertCollections() {
20 public static void assertEmpty(final Collection<?> set) {
21 Assert.assertTrue(set.isEmpty());
24 public static void assertEmpty(final Map<?,?> set) {
25 Assert.assertTrue(set.isEmpty());
28 public static void assertContains(final Collection<?> set, final Object... values) {
29 for (Object key : values) {
30 Assert.assertTrue(set.contains(key));
35 public static void assertContains(final Map<?,?> map, final Object... values) {
36 for (Object key : values) {
37 Assert.assertTrue(map.containsKey(key));
41 public static void assertNotContains(final Collection<?> set, final Object... values) {
42 for (Object key : values) {
43 Assert.assertFalse(set.contains(key));
47 public static void assertNotContains(final Map<?,?> map, final Object... values) {
48 for (Object key : values) {
49 Assert.assertFalse(map.containsKey(key));