Package: TestEnvironmentUtils
TestEnvironmentUtils
name | instruction | branch | complexity | line | method | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
TestEnvironmentUtils() |
|
|
|
|
|
||||||||||||||||||||
arePropertiesEqual(Map, Map) |
|
|
|
|
|
Coverage
1: /**
2: * Copyright (C) 2016 Czech Technical University in Prague
3: *
4: * This program is free software: you can redistribute it and/or modify it under
5: * the terms of the GNU General Public License as published by the Free Software
6: * Foundation, either version 3 of the License, or (at your option) any
7: * later version.
8: *
9: * This program is distributed in the hope that it will be useful, but WITHOUT
10: * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11: * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
12: * details. You should have received a copy of the GNU General Public License
13: * along with this program. If not, see <http://www.gnu.org/licenses/>.
14: */
15: package cz.cvut.kbss.jopa.test.environment;
16:
17: import java.util.Map;
18: import java.util.Set;
19:
20: public class TestEnvironmentUtils {
21:
22: public static boolean arePropertiesEqual(Map<String, Set<String>> pOne,
23: Map<String, Set<String>> pTwo) {
24:• if (pOne.size() != pTwo.size()) {
25: return false;
26: }
27:• for (Map.Entry<String, Set<String>> e : pOne.entrySet()) {
28:• if (!pTwo.containsKey(e.getKey())) {
29: return false;
30: }
31: final Set<String> set = pTwo.get(e.getKey());
32:• if (!e.getValue().equals(set)) {
33: return false;
34: }
35: }
36: return true;
37: }
38: }