use of de.geeksfactory.opacclient.i18n.DummyStringProvider in project opacclient by opacapp.
the class PicaLBSAccountTest method testParseMediaList.
@Test
public void testParseMediaList() throws OpacApi.OpacErrorException {
String html = readResource("/pica_lbs/medialist/" + file);
// we may not have all files for all libraries
if (html == null)
return;
List<LentItem> media = PicaLBS.parseMediaList(Jsoup.parse(html), new DummyStringProvider());
assertTrue(media.size() > 0);
for (LentItem item : media) {
assertNotNull(item.getTitle());
assertNotNull(item.getDeadline());
}
}
use of de.geeksfactory.opacclient.i18n.DummyStringProvider in project opacclient by opacapp.
the class PicaOldAccountTest method testParseResList.
@Test
public void testParseResList() throws OpacApi.OpacErrorException {
String html = readResource("/pica_old/reslist/" + file);
// we may not have all files for all libraries
if (html == null)
return;
List<ReservedItem> media = new ArrayList<>();
PicaOld.parseResList(media, Jsoup.parse(html), new DummyStringProvider());
assertTrue(media.size() > 0);
}
use of de.geeksfactory.opacclient.i18n.DummyStringProvider in project opacclient by opacapp.
the class WinBiapAccountTest method testParseResList.
@Test
public void testParseResList() throws OpacApi.OpacErrorException {
String html = readResource("/winbiap/reslist/" + file);
// we may not have all files for all libraries
if (html == null)
return;
List<ReservedItem> media = WinBiap.parseResList(Jsoup.parse(html), new DummyStringProvider(), new JSONObject());
for (ReservedItem item : media) {
assertNotNull(item.getMediaType());
assertContainsData(item.getCover());
}
assertTrue(media.size() > 0);
}
use of de.geeksfactory.opacclient.i18n.DummyStringProvider in project opacclient by opacapp.
the class PicaLBSAccountTest method testParseResList.
@Test
public void testParseResList() throws OpacApi.OpacErrorException {
String html = readResource("/pica_lbs/reslist/" + file);
// we may not have all files for all libraries
if (html == null)
return;
List<ReservedItem> media = PicaLBS.parseResList(Jsoup.parse(html), new DummyStringProvider());
assertTrue(media.size() > 0);
}
use of de.geeksfactory.opacclient.i18n.DummyStringProvider in project opacclient by opacapp.
the class AdisAccountTest method testParseReservationList.
@Test
public void testParseReservationList() throws OpacApi.OpacErrorException, JSONException {
String html = readResource("/adis/reslist/" + file);
// we may not have all files for all libraries
if (html == null)
return;
List<ReservedItem> res = new ArrayList<>();
DateTimeFormatter fmt = DateTimeFormat.forPattern("dd.MM.yyyy").withLocale(Locale.GERMAN);
String[] rlink = new String[] { "Vormerkungen zeigen oder löschen", "https://opac.sbs.stuttgart.de/aDISWeb/app;" + "jsessionid=98AAE50B33FC5A0C191319D406D1564E?service=direct/1/POOLM02Q" + "@@@@@@@@_4B032E00_349DAD80/Tabelle_Z1LW01.cellInternalLink" + ".directlink&sp=SRGLINK_3&sp=SZM&requestCount=2" };
Adis.parseReservationList(Jsoup.parse(html), rlink, true, res, fmt, new DummyStringProvider());
assertTrue(res.size() > 0);
for (ReservedItem item : res) {
assertNotNull(item.getTitle());
}
}
Aggregations