@KOTest public void loadAndParseArrayInPeople() throws InterruptedException {
if (js == null) {
url = Utils.prepareURL(
JSONTest.class, "{'info':[{'firstName': 'Gitar', 'sex': 'FEMALE'}]}",
"application/json"
);
js = Models.bind(new JSONik(), newContext());
js.applyBindings();
js.fetchPeople(url);
}
if (0 == js.getFetchedCount()) {
throw new InterruptedException();
}
assertEquals(js.getFetchedCount(), 1, "One person loaded: " + js.getFetchedCount());
Person p = js.getFetched();
assertNotNull(p, "We should get our person back: " + p);
assertEquals("Gitar", p.getFirstName(), "Expecting Gitar: " + p.getFirstName());
assertEquals(Sex.FEMALE, p.getSex(), "Expecting FEMALE: " + p.getSex());
}