use of dk.dbc.search.solrdocstore.OpenAgencyUtil.COMMON_AGENCY in project solr-document-store by DBCDK.
the class DocumentRetrieveBeanIT method getDocumentWithHoldings.
@Test
public void getDocumentWithHoldings() throws Exception {
System.out.println("getDocumentWithHoldings");
DocumentRetrieveResponse resp = env().getPersistenceContext().run(() -> {
build(300055).holdings(ON_SHELF);
build(800055).holdings(ON_SHELF);
build(710001, "CBA").holdings(ON_SHELF);
return bean.getDocumentWithHoldingsitems(COMMON_AGENCY, "basis", ID);
});
System.out.println("resp = " + resp);
Set<String> holdings = resp.holdingsItemRecords.stream().map(h -> h.getAgencyId() + "-" + h.getBibliographicRecordId()).collect(Collectors.toSet());
assertThat(holdings, Matchers.containsInAnyOrder("300055-ABC", "710001-CBA"));
}
Aggregations