Deprecate all MD-SAL APIs
[controller.git] / opendaylight / md-sal / sal-binding-broker / src / test / java / org / opendaylight / controller / md / sal / binding / test / AssertCollections.java
1 /*
2  * Copyright (c) 2014, 2015 Cisco Systems, Inc. and others.  All rights reserved.
3  *
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
7  */
8
9 package org.opendaylight.controller.md.sal.binding.test;
10
11 import java.util.Collection;
12 import java.util.Map;
13 import org.junit.Assert;
14
15 @Deprecated
16 public final class AssertCollections {
17     private AssertCollections() {
18     }
19
20     public static void assertEmpty(final Collection<?> set) {
21         Assert.assertTrue(set.isEmpty());
22     }
23
24     public static void assertEmpty(final Map<?,?> set) {
25         Assert.assertTrue(set.isEmpty());
26     }
27
28     public static void assertContains(final Collection<?> set, final Object... values) {
29         for (Object key : values) {
30             Assert.assertTrue(set.contains(key));
31         }
32
33     }
34
35     public static void assertContains(final Map<?,?> map, final Object... values) {
36         for (Object key : values) {
37             Assert.assertTrue(map.containsKey(key));
38         }
39     }
40
41     public static void assertNotContains(final Collection<?> set, final Object... values) {
42         for (Object key : values) {
43             Assert.assertFalse(set.contains(key));
44         }
45     }
46
47     public static void assertNotContains(final Map<?,?> map, final Object... values) {
48         for (Object key : values) {
49             Assert.assertFalse(map.containsKey(key));
50         }
51     }
52 }