Search in sources :

Example 1 with Identifier

use of org.folio.rest.jaxrs.model.Identifier in project mod-kb-ebsco-java by folio-org.

the class TitlePostBodyValidatorTest method shouldThrowExceptionIfTitleIdentifierIdTooLong.

@Test(expected = InputValidationException.class)
public void shouldThrowExceptionIfTitleIdentifierIdTooLong() {
    TitlePostRequest titlePostRequest = new TitlePostRequest();
    List<Identifier> titleIdentifiers = new ArrayList<>();
    titleIdentifiers.add(new Identifier().withId("1234567-1234567-1234567"));
    titlePostRequest.withData(new TitlePostData().withAttributes(new TitlePostDataAttributes().withName(TITLE_TEST_NAME).withPublisherName("Test publisher name").withIdentifiers(titleIdentifiers)));
    validator.validate(titlePostRequest);
}
Also used : TitlePostRequest(org.folio.rest.jaxrs.model.TitlePostRequest) Identifier(org.folio.rest.jaxrs.model.Identifier) ArrayList(java.util.ArrayList) TitlePostData(org.folio.rest.jaxrs.model.TitlePostData) TitlePostDataAttributes(org.folio.rest.jaxrs.model.TitlePostDataAttributes) Test(org.junit.Test)

Aggregations

ArrayList (java.util.ArrayList)1 Identifier (org.folio.rest.jaxrs.model.Identifier)1 TitlePostData (org.folio.rest.jaxrs.model.TitlePostData)1 TitlePostDataAttributes (org.folio.rest.jaxrs.model.TitlePostDataAttributes)1 TitlePostRequest (org.folio.rest.jaxrs.model.TitlePostRequest)1 Test (org.junit.Test)1