Skip to content

Commit

Permalink
(#28) Added getBlob
Browse files Browse the repository at this point in the history
  • Loading branch information
svettwer committed Apr 12, 2019
1 parent 3d6ef4c commit c8cc8b9
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -181,8 +181,8 @@ public Ref getRef(final int parameterIndex) throws SQLException {

@Override
public Blob getBlob(final int parameterIndex) throws SQLException {
notSupported("getBlob(int parameterIndex)");
return null;
prepareResultSet();
return resultSet.getBlob(parameterIndex);
}

@Override
Expand Down Expand Up @@ -464,8 +464,8 @@ public Ref getRef(final String parameterName) throws SQLException {

@Override
public Blob getBlob(final String parameterName) throws SQLException {
notSupported("getBlob(String parameterName)");
return null;
prepareResultSet();
return resultSet.getBlob(parameterName);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -867,6 +867,28 @@ public void testGetClobByName() {
verify(resultSetSpy).getClob(TEST_VALUE_NAME);
}

@Test
public void testGetBlobByIndex() throws SQLException {

//WHEN
callableStatement.getBlob(TEST_VALUE_INDEX);

//THEN
verify(resultSetSpy).next();
verify(resultSetSpy).getBlob(TEST_VALUE_INDEX);
}

@Test
public void testGetBlobByName() throws SQLException {

//WHEN
callableStatement.getBlob(TEST_VALUE_NAME);

//THEN
verify(resultSetSpy).next();
verify(resultSetSpy).getBlob(TEST_VALUE_NAME);
}

@Test
public void testToString(){
ToStringVerifier
Expand Down

0 comments on commit c8cc8b9

Please sign in to comment.