use of org.folio.rest.jaxrs.model.ProviderPutDataAttributes in project mod-kb-ebsco-java by folio-org.
the class ProviderPutBodyValidatorTest method shouldNotThrowExceptionWhenTokenIsValidLength.
@Test
public void shouldNotThrowExceptionWhenTokenIsValidLength() {
Token providerToken = new Token();
providerToken.setValue(RandomStringUtils.randomAlphanumeric(500));
ProviderPutRequest request = new ProviderPutRequest().withData(new ProviderPutData().withAttributes(new ProviderPutDataAttributes().withProviderToken(providerToken)));
validator.validate(request);
}
use of org.folio.rest.jaxrs.model.ProviderPutDataAttributes in project mod-kb-ebsco-java by folio-org.
the class ProviderPutBodyValidatorTest method shouldThrowExceptionWhenTokenIsTooLong.
@Test(expected = InputValidationException.class)
public void shouldThrowExceptionWhenTokenIsTooLong() {
Token providerToken = new Token();
providerToken.setValue(RandomStringUtils.randomAlphanumeric(501));
ProviderPutRequest request = new ProviderPutRequest().withData(new ProviderPutData().withAttributes(new ProviderPutDataAttributes().withProviderToken(providerToken)));
validator.validate(request);
}
Aggregations