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;
15 public final class AssertCollections {
16 private AssertCollections() {
19 public static void assertEmpty(final Collection<?> set) {
20 Assert.assertTrue(set.isEmpty());
23 public static void assertEmpty(final Map<?,?> set) {
24 Assert.assertTrue(set.isEmpty());
27 public static void assertContains(final Collection<?> set, final Object... values) {
28 for (Object key : values) {
29 Assert.assertTrue(set.contains(key));
34 public static void assertContains(final Map<?,?> map, final Object... values) {
35 for (Object key : values) {
36 Assert.assertTrue(map.containsKey(key));
40 public static void assertNotContains(final Collection<?> set, final Object... values) {
41 for (Object key : values) {
42 Assert.assertFalse(set.contains(key));
46 public static void assertNotContains(final Map<?,?> map, final Object... values) {
47 for (Object key : values) {
48 Assert.assertFalse(map.containsKey(key));