File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed
src/test/java/org/apache/ibatis/builder Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change 17
17
18
18
import java .util .Map ;
19
19
import org .junit .Assert ;
20
+ import org .junit .Rule ;
20
21
import org .junit .Test ;
22
+ import org .junit .rules .ExpectedException ;
23
+
24
+ import static org .hamcrest .core .Is .is ;
21
25
22
26
public class ParameterExpressionTest {
23
27
28
+ @ Rule
29
+ public ExpectedException expectedException = ExpectedException .none ();
30
+
24
31
@ Test
25
32
public void simpleProperty () {
26
33
Map <String , String > result = new ParameterExpression ("id" );
@@ -124,4 +131,11 @@ public void shouldIgnoreLeadingAndTrailingSpaces() {
124
131
Assert .assertEquals ("val2" , result .get ("attr2" ));
125
132
}
126
133
134
+ @ Test
135
+ public void invalidOldJdbcTypeFormat () {
136
+ expectedException .expect (BuilderException .class );
137
+ expectedException .expectMessage (is ("Parsing error in {id:} in position 3" ));
138
+ new ParameterExpression ("id:" );
139
+ }
140
+
127
141
}
You can’t perform that action at this time.
0 commit comments