use of org.folio.repository.holdings.DbHoldingInfo in project mod-kb-ebsco-java by folio-org.
the class HoldingsCollectionItemConverterTest method shouldConvertHoldingToResource.
@Test
public void shouldConvertHoldingToResource() throws IOException, URISyntaxException {
DbHoldingInfo holding = getStubHolding();
final ResourceCollectionItem resourceCollectionItem = holdingCollectionItemConverter.convert(holding);
assertThat(resourceCollectionItem.getId(), equalTo("123356-3157070-19412030"));
assertThat(resourceCollectionItem.getAttributes().getName(), equalTo("Test Title"));
assertThat(resourceCollectionItem.getAttributes().getTitleId(), equalTo(19412030));
assertThat(resourceCollectionItem.getAttributes().getPublisherName(), equalTo("Test one Press"));
assertThat(resourceCollectionItem.getAttributes().getPublicationType(), equalTo(PublicationType.BOOK));
}
Aggregations