Search in sources :

Example 1 with PackageTagsPutData

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

the class PackageTagsPutBodyValidatorTest method shouldThrowExceptionWhenNameIsEmpty.

@Test(expected = InputValidationException.class)
public void shouldThrowExceptionWhenNameIsEmpty() {
    PackageTagsPutRequest request = new PackageTagsPutRequest().withData(new PackageTagsPutData().withAttributes(new PackageTagsDataAttributes().withName("").withContentType(ContentType.E_BOOK)));
    validator.validate(request);
}
Also used : PackageTagsPutRequest(org.folio.rest.jaxrs.model.PackageTagsPutRequest) PackageTagsPutData(org.folio.rest.jaxrs.model.PackageTagsPutData) PackageTagsDataAttributes(org.folio.rest.jaxrs.model.PackageTagsDataAttributes) Test(org.junit.Test)

Example 2 with PackageTagsPutData

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

the class PackageTagsPutBodyValidatorTest method shouldThrowExceptionWhenContentTypeIsNull.

@Test(expected = InputValidationException.class)
public void shouldThrowExceptionWhenContentTypeIsNull() {
    PackageTagsPutRequest request = new PackageTagsPutRequest().withData(new PackageTagsPutData().withAttributes(new PackageTagsDataAttributes().withName("name")));
    validator.validate(request);
}
Also used : PackageTagsPutRequest(org.folio.rest.jaxrs.model.PackageTagsPutRequest) PackageTagsPutData(org.folio.rest.jaxrs.model.PackageTagsPutData) PackageTagsDataAttributes(org.folio.rest.jaxrs.model.PackageTagsDataAttributes) Test(org.junit.Test)

Aggregations

PackageTagsDataAttributes (org.folio.rest.jaxrs.model.PackageTagsDataAttributes)2 PackageTagsPutData (org.folio.rest.jaxrs.model.PackageTagsPutData)2 PackageTagsPutRequest (org.folio.rest.jaxrs.model.PackageTagsPutRequest)2 Test (org.junit.Test)2