1
0
Fork 0
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:
stleary 2015-04-09 18:02:45 -05:00
parent a9bce1d6b2
commit bef37079dc
2 changed files with 78 additions and 5 deletions

View file

@ -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);
}
}
}