mirror of
https://github.com/fankes/JSON-java-compat.git
synced 2025-09-07 03:06:03 +08:00
in progress
This commit is contained in:
13
Util.java
13
Util.java
@@ -70,4 +70,17 @@ public class Util {
|
||||
}
|
||||
}
|
||||
|
||||
public static void compareActualVsExpectedStringArrays(String[] names,
|
||||
String [] expectedNames) {
|
||||
assertTrue("Array lengths should be equal",
|
||||
names.length == expectedNames.length);
|
||||
List<String> lNames = new ArrayList<String>(Arrays.asList(names));
|
||||
for (int i = 0; i < expectedNames.length; ++i) {
|
||||
String expectedName = expectedNames[i];
|
||||
assertTrue("expected to find "+expectedName,
|
||||
lNames.contains(expectedName));
|
||||
lNames.remove(expectedName);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user