Skip to content

Commit

Permalink
Add missing unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
kaklakariada committed Jan 20, 2024
1 parent 7d0ed3c commit 0dc80ed
Showing 1 changed file with 16 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -896,19 +896,33 @@ void updateRefLabel() throws SQLException {
}

@Test
void updateBlobIndex() throws SQLException {
void updateBlobIndexStream() throws SQLException {
final InputStream stream = new ByteArrayInputStream(new byte[] { 2 });
testee().updateBlob(COL_INDEX, stream);
verify(resultSetMock).updateBlob(eq(COL_INDEX), same(stream));
}

@Test
void updateBlobLabel() throws SQLException {
void updateBlobIndexBlob() throws SQLException {
final Blob blobMock = mock(Blob.class);
testee().updateBlob(COL_INDEX, blobMock);
verify(resultSetMock).updateBlob(eq(COL_INDEX), same(blobMock));
}

@Test
void updateBlobLabelStream() throws SQLException {
final InputStream stream = new ByteArrayInputStream(new byte[] { 2 });
testee().updateBlob(COL_LABEL, stream);
verify(resultSetMock).updateBlob(eq(COL_LABEL), same(stream));
}

@Test
void updateBlobLabelBlob() throws SQLException {
final Blob blobMock = mock(Blob.class);
testee().updateBlob(COL_LABEL, blobMock);
verify(resultSetMock).updateBlob(eq(COL_LABEL), same(blobMock));
}

@Test
void updateClobIndex() throws SQLException {
final Clob clob = mock(Clob.class);
Expand Down

0 comments on commit 0dc80ed

Please sign in to comment.