File tree Expand file tree Collapse file tree 1 file changed +20
-0
lines changed
src/test/java/org/apache/ibatis/type Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -88,4 +88,24 @@ public void shouldGetResultNullFromCallableStatement() throws Exception {
8888 verify (cs , never ()).wasNull ();
8989 }
9090
91+ @ Test
92+ void testEmptyStringGetStringByName () throws Exception {
93+ when (rs .getString ("column" )).thenReturn ("" );
94+ assertNull (TYPE_HANDLER .getResult (rs , "column" ));
95+ verify (rs , never ()).wasNull ();
96+ }
97+
98+ @ Test
99+ void testEmptyStringGetStringByIndex () throws Exception {
100+ when (rs .getString (1 )).thenReturn ("" );
101+ assertNull (TYPE_HANDLER .getResult (rs , 1 ));
102+ verify (rs , never ()).wasNull ();
103+ }
104+
105+ @ Test
106+ void testEmptyStringCallableStatementGetStringByIndex () throws Exception {
107+ when (cs .getString (1 )).thenReturn ("" );
108+ assertNull (TYPE_HANDLER .getResult (cs , 1 ));
109+ verify (cs , never ()).wasNull ();
110+ }
91111}
You can’t perform that action at this time.
0 commit comments