use of dk.dbc.search.solrdocstore.response.ExistsResponse in project solr-document-store by DBCDK.
the class ExistenceBeanIT method testBibliographicExisting.
@Test(timeout = 2_000L)
public void testBibliographicExisting() throws Exception {
System.out.println("testBibliographicExisting");
ExistsResponse existence = jpa(em -> {
em.merge(new BibliographicEntity(870970, "clazzifier", "12345678", "repo", "work:1", "unit:1", false, null, "track:1"));
return bean.bibliographicExists(870970, "clazzifier", "12345678");
});
assertThat(existence.exists, is(true));
}
use of dk.dbc.search.solrdocstore.response.ExistsResponse in project solr-document-store by DBCDK.
the class ExistenceBeanIT method testBibliographicDeleted.
@Test(timeout = 2_000L)
public void testBibliographicDeleted() throws Exception {
System.out.println("testBibliographicDeleted");
ExistsResponse existence = jpa(em -> {
em.merge(new BibliographicEntity(870970, "clazzifier", "12345678", "repo", null, null, true, null, "track:1"));
return bean.bibliographicExists(870970, "clazzifier", "12345678");
});
assertThat(existence.exists, is(false));
}
use of dk.dbc.search.solrdocstore.response.ExistsResponse in project solr-document-store by DBCDK.
the class ExistenceBeanIT method testHoldingsNonExisting.
@Test(timeout = 2_000L)
public void testHoldingsNonExisting() throws Exception {
System.out.println("testHoldingsNonExisting");
ExistsResponse existence = jpa(em -> {
return bean.holdingExists(777777, "12345678");
});
assertThat(existence.exists, is(false));
}
use of dk.dbc.search.solrdocstore.response.ExistsResponse in project solr-document-store by DBCDK.
the class ExistenceBeanIT method testHoldingsExisting.
@Test(timeout = 2_000L)
public void testHoldingsExisting() throws Exception {
System.out.println("testHoldingsExisting");
ExistsResponse existence = jpa(em -> {
em.merge(new HoldingsItemEntity(777777, "12345678", SolrIndexKeys.ON_SHELF, "track:1"));
return bean.holdingExists(777777, "12345678");
});
assertThat(existence.exists, is(true));
}
use of dk.dbc.search.solrdocstore.response.ExistsResponse in project solr-document-store by DBCDK.
the class ExistenceBeanIT method testBibliographicNonExisting.
@Test(timeout = 2_000L)
public void testBibliographicNonExisting() throws Exception {
System.out.println("testBibliographicNonExisting");
ExistsResponse existence = jpa(em -> {
return bean.bibliographicExists(870970, "clazzifier", "12345678");
});
assertThat(existence.exists, is(false));
}
Aggregations