mirror of
https://github.com/ethauvin/JSON-java.git
synced 2025-06-17 16:00:51 -07:00
in progress
This commit is contained in:
parent
a9bce1d6b2
commit
bef37079dc
2 changed files with 78 additions and 5 deletions
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);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue