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
8 package org.opendaylight.mdsal.binding.dom.adapter.test;
10 import java.util.Collection;
12 import org.junit.Assert;
14 public final class AssertCollections {
15 private AssertCollections() {
18 public static void assertEmpty(final Collection<?> set) {
19 Assert.assertTrue(set.isEmpty());
22 public static void assertEmpty(final Map<?,?> set) {
23 Assert.assertTrue(set.isEmpty());
26 public static void assertContains(final Collection<?> set, final Object... values) {
27 for (Object key : values) {
28 Assert.assertTrue(set.contains(key));
32 public static void assertContains(final Map<?,?> map, final Object... values) {
33 for (Object key : values) {
34 Assert.assertTrue(map.containsKey(key));
38 public static void assertNotContains(final Collection<?> set, final Object... values) {
39 for (Object key : values) {
40 Assert.assertFalse(set.contains(key));
44 public static void assertNotContains(final Map<?,?> map, final Object... values) {
45 for (Object key : values) {
46 Assert.assertFalse(map.containsKey(key));