Refine search
@Test public void testDataFormatValidation() { for (Type type : asList(TIMESTAMP, DOUBLE)) { assertThatThrownBy(() -> singleColumnDecoder(type, "wrong_format")) .isInstanceOf(PrestoException.class) .hasMessage("unknown data format 'wrong_format' used for column 'some_column'"); } }
@Test public void constructorWhenAuthorizedClientServiceIsNullThenThrowIllegalArgumentException() { assertThatThrownBy(() -> new AuthenticatedPrincipalOAuth2AuthorizedClientRepository(null)) .isInstanceOf(IllegalArgumentException.class); }
@Test public void setAuthorizedClientRepositoryWhenAuthorizedClientRepositoryIsNullThenThrowIllegalArgumentException() { assertThatThrownBy(() -> this.authorizedClientRepository.setAnonymousAuthorizedClientRepository(null)) .isInstanceOf(IllegalArgumentException.class); }
private void assertWrongDataFormatException(ThrowableAssert.ThrowingCallable callable) { assertThatThrownBy(callable) .isInstanceOf(PrestoException.class) .hasMessageMatching("Wrong dataFormat .* specified for column .*"); }
@Test public void saveAuthorizedClientWhenAuthorizedClientIsNullThenThrowIllegalArgumentException() { assertThatThrownBy(() -> this.authorizedClientRepository.saveAuthorizedClient(null, null, this.exchange).block()) .isInstanceOf(IllegalArgumentException.class); }
private void assertUnsupportedColumnTypeException(ThrowableAssert.ThrowingCallable callable) { assertThatThrownBy(callable) .isInstanceOf(PrestoException.class) .hasMessageMatching("Unsupported column type .* for column .*"); }
@Test public void setRequestEntityConverterWhenConverterIsNullThenThrowIllegalArgumentException() { assertThatThrownBy(() -> this.tokenResponseClient.setRequestEntityConverter(null)) .isInstanceOf(IllegalArgumentException.class); }
@Test public void testInvalidConstructorArguments() { assertThatThrownBy(() -> new OperationTimer(false, true)).isInstanceOf(IllegalArgumentException.class); }
@Test public void setRestOperationsWhenRestOperationsIsNullThenThrowIllegalArgumentException() { assertThatThrownBy(() -> this.tokenResponseClient.setRestOperations(null)) .isInstanceOf(IllegalArgumentException.class); }
private void assertUnsupportedColumnTypeException(ThrowingCallable callable) { assertThatThrownBy(callable) .isInstanceOf(PrestoException.class) .hasMessageMatching("unsupported column type .* for column .*"); }
@Test public void removeAuthorizedClientWhenRequestIsNullThenThrowIllegalArgumentException() { assertThatThrownBy(() -> this.authorizedClientRepository.removeAuthorizedClient( this.registrationId1, null, null, this.response)).isInstanceOf(IllegalArgumentException.class); }
private void assertRuntimeDecodingFailure(ThrowableAssert.ThrowingCallable callable) { assertThatThrownBy(callable) .isInstanceOf(PrestoException.class) .hasMessageMatching("could not parse value .* as .* for column .*"); } }
@Test public void setErrorConverterWhenConverterIsNullThenThrowIllegalArgumentException() { assertThatThrownBy(() -> this.messageConverter.setErrorConverter(null)) .isInstanceOf(IllegalArgumentException.class); }
private void assertUnsupportedColumnTypeException(ThrowableAssert.ThrowingCallable callable) { assertThatThrownBy(callable) .isInstanceOf(PrestoException.class) .hasMessageMatching("Unsupported column type .* for column .*"); }
@Test public void constructorWhenAuthorizedClientServiceIsNullThenThrowIllegalArgumentException() { assertThatThrownBy(() -> new AuthenticatedPrincipalOAuth2AuthorizedClientRepository(null)) .isInstanceOf(IllegalArgumentException.class); }
private void assertMappingDoesNotMatchDataFormatException(ThrowableAssert.ThrowingCallable callable) { assertThatThrownBy(callable) .isInstanceOf(PrestoException.class) .hasMessageContaining("Bytes mapping for column 'some_column' does not match dataFormat"); }
@Test public void constructorTokenRequestResponseWhenAuthorizationExchangeIsNullThenThrowIllegalArgumentException() { assertThatThrownBy(() -> new OAuth2AuthorizationCodeAuthenticationToken(this.clientRegistration, null, this.accessToken)) .isInstanceOf(IllegalArgumentException.class); }
private void assertUnsupportedColumnTypeException(ThrowableAssert.ThrowingCallable callable) { assertThatThrownBy(callable) .isInstanceOf(PrestoException.class) .hasMessageMatching("Unsupported column type .* for column .*"); }
@Test public void matchesWhenUnMappedThenIllegalArgumentException() { assertThatThrownBy(() -> this.passwordEncoder.matches(this.rawPassword, "{unmapped}" + this.rawPassword)) .isInstanceOf(IllegalArgumentException.class) .hasMessage("There is no PasswordEncoder mapped for the id \"unmapped\""); verifyZeroInteractions(this.bcrypt, this.noop); }
@Test public void testInvalidDataFormat() { assertThatThrownBy(() -> singleColumnDecoder(BigintType.BIGINT, "0", "format", null, false, false, false)) .isInstanceOf(PrestoException.class) .hasMessageMatching("invalid dataFormat 'format' for column 'some_column'"); }