/** Tests that "not supported" has priority over possible "type not supported" * check. */ @Test( expected = SQLFeatureNotSupportedException.class ) public void testParamSettingWhenUnsupportedTypeSaysUnsupported() throws SQLException { try(PreparedStatement prepStmt = connection.prepareStatement( "VALUES 1" )) { try { prepStmt.setClob(2, (Clob) null); } catch (final SQLFeatureNotSupportedException e) { assertThat( "Check whether params.-unsupported wording changed or checks changed.", e.toString(), PARAMETERS_NOT_SUPPORTED_MSG_MATCHER ); throw e; } } }
/** Tests that "not supported" has priority over possible "type not supported" * check. */ @Test( expected = SQLFeatureNotSupportedException.class ) public void testParamSettingWhenUnsupportedTypeSaysUnsupported() throws SQLException { try(PreparedStatement prepStmt = connection.prepareStatement( "VALUES 1" )) { try { prepStmt.setClob(2, (Clob) null); } catch (final SQLFeatureNotSupportedException e) { assertThat( "Check whether params.-unsupported wording changed or checks changed.", e.toString(), PARAMETERS_NOT_SUPPORTED_MSG_MATCHER ); throw e; } } }
/** Tests that "not supported" has priority over possible "no parameters" * check. */ @Test( expected = SQLFeatureNotSupportedException.class ) public void testParamSettingWhenNoParametersIndexSaysUnsupported() throws SQLException { try(PreparedStatement prepStmt = connection.prepareStatement( "VALUES 1" )) { try { prepStmt.setBytes(4, null); } catch (final SQLFeatureNotSupportedException e) { assertThat( "Check whether params.-unsupported wording changed or checks changed.", e.toString(), PARAMETERS_NOT_SUPPORTED_MSG_MATCHER ); throw e; } } }
/** Tests that "not supported" has priority over possible "no parameters" * check. */ @Test( expected = SQLFeatureNotSupportedException.class ) public void testParamSettingWhenNoParametersIndexSaysUnsupported() throws SQLException { try(PreparedStatement prepStmt = connection.prepareStatement( "VALUES 1" )) { try { prepStmt.setBytes(4, null); } catch (final SQLFeatureNotSupportedException e) { assertThat( "Check whether params.-unsupported wording changed or checks changed.", e.toString(), PARAMETERS_NOT_SUPPORTED_MSG_MATCHER ); throw e; } } }
/** Tests that "not supported" has priority over possible "type not supported" * check. */ @Test( expected = SQLFeatureNotSupportedException.class ) public void testParamSettingWhenUnsupportedTypeSaysUnsupported() throws SQLException { try(PreparedStatement prepStmt = getConnection().prepareStatement( "VALUES 1" )) { try { prepStmt.setClob(2, (Clob) null); } catch (final SQLFeatureNotSupportedException e) { assertThat( "Check whether params.-unsupported wording changed or checks changed.", e.toString(), PARAMETERS_NOT_SUPPORTED_MSG_MATCHER ); throw e; } } }
/** Tests that "not supported" has priority over possible "no parameters" * check. */ @Test( expected = SQLFeatureNotSupportedException.class ) public void testParamSettingWhenNoParametersIndexSaysUnsupported() throws SQLException { try(PreparedStatement prepStmt = getConnection().prepareStatement( "VALUES 1" )) { try { prepStmt.setBytes(4, null); } catch (final SQLFeatureNotSupportedException e) { assertThat( "Check whether params.-unsupported wording changed or checks changed.", e.toString(), PARAMETERS_NOT_SUPPORTED_MSG_MATCHER ); throw e; } } }
/** Tests that "not supported" has priority over possible "no parameters" * check. */ @Test( expected = SQLFeatureNotSupportedException.class ) public void testParamSettingWhenNoParametersIndexSaysUnsupported() throws SQLException { try(PreparedStatement prepStmt = getConnection().prepareStatement( "VALUES 1" )) { try { prepStmt.setBytes(4, null); } catch (final SQLFeatureNotSupportedException e) { assertThat( "Check whether params.-unsupported wording changed or checks changed.", e.toString(), PARAMETERS_NOT_SUPPORTED_MSG_MATCHER ); throw e; } } }
/** Tests that "not supported" has priority over possible "type not supported" * check. */ @Test( expected = SQLFeatureNotSupportedException.class ) public void testParamSettingWhenUnsupportedTypeSaysUnsupported() throws SQLException { try(PreparedStatement prepStmt = getConnection().prepareStatement( "VALUES 1" )) { try { prepStmt.setClob(2, (Clob) null); } catch (final SQLFeatureNotSupportedException e) { assertThat( "Check whether params.-unsupported wording changed or checks changed.", e.toString(), PARAMETERS_NOT_SUPPORTED_MSG_MATCHER ); throw e; } } }