Skip to content

Commit

Permalink
(#36) Added a test to ensure parameter orders are preserved
Browse files Browse the repository at this point in the history
  • Loading branch information
svettwer committed May 7, 2019
1 parent dba4c54 commit bdc86d3
Showing 1 changed file with 15 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,21 @@ public void testSetParameterOverwritesValue() {
assertEquals(jdbcPreparedStatement.getParameters().get("0"), 42);
}

@Test
public void testParameterOrderIsPreserved(){

//GIVEN

//WHEN
jdbcPreparedStatement.setParameter(2, 42);
jdbcPreparedStatement.setParameter(1, 2);

//THEN
assertEquals(jdbcPreparedStatement.getParameters().size(), 2);
assertEquals(jdbcPreparedStatement.getParameters().get("0"), 2);
assertEquals(jdbcPreparedStatement.getParameters().get("1"), 42);
}

@Test
public void textExecuteBatchedPreparedStatements() throws SQLException {

Expand Down

0 comments on commit bdc86d3

Please sign in to comment.