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.mdsal.binding.dom.adapter.test;
11 import java.util.Collection;
14 import org.junit.Assert;
16 public final class AssertCollections {
18 private AssertCollections() {
21 public static void assertEmpty(final Collection<?> set) {
22 Assert.assertTrue(set.isEmpty());
25 public static void assertEmpty(final Map<?,?> set) {
26 Assert.assertTrue(set.isEmpty());
29 public static void assertContains(final Collection<?> set, final Object... values) {
30 for (Object key : values) {
31 Assert.assertTrue(set.contains(key));
36 public static void assertContains(final Map<?,?> map, final Object... values) {
37 for (Object key : values) {
38 Assert.assertTrue(map.containsKey(key));
42 public static void assertNotContains(final Collection<?> set, final Object... values) {
43 for (Object key : values) {
44 Assert.assertFalse(set.contains(key));
48 public static void assertNotContains(final Map<?,?> map, final Object... values) {
49 for (Object key : values) {
50 Assert.assertFalse(map.containsKey(key));