File tree Expand file tree Collapse file tree 1 file changed +22
-0
lines changed
src/test/java/org/apache/ibatis/binding Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Original file line number Diff line number Diff line change 9
9
import org .junit .Test ;
10
10
11
11
import java .util .*;
12
+ import org .junit .Ignore ;
12
13
13
14
public class BindingTest {
14
15
private static SqlSessionFactory sqlSessionFactory ;
@@ -133,6 +134,27 @@ public void shouldExecuteBoundSelectMapOfBlogsById() {
133
134
session .close ();
134
135
}
135
136
}
137
+
138
+ @ Test
139
+ @ Ignore
140
+ public void shouldExecuteMultipleBoundSelectMapOfBlogsById () {
141
+ SqlSession session = sqlSessionFactory .openSession ();
142
+ try {
143
+ BoundBlogMapper mapper = session .getMapper (BoundBlogMapper .class );
144
+ Map <Integer ,Blog > blogs = mapper .selectBlogsAsMapById ();
145
+ Map <Integer ,Blog > moreBlogs = mapper .selectBlogsAsMapById ();
146
+ assertEquals (2 , blogs .size ());
147
+ assertEquals (2 , moreBlogs .size ());
148
+ for (Map .Entry <Integer ,Blog > blogEntry : blogs .entrySet ()) {
149
+ assertEquals (blogEntry .getKey (), (Integer ) blogEntry .getValue ().getId ());
150
+ }
151
+ for (Map .Entry <Integer ,Blog > blogEntry : moreBlogs .entrySet ()) {
152
+ assertEquals (blogEntry .getKey (), (Integer ) blogEntry .getValue ().getId ());
153
+ }
154
+ } finally {
155
+ session .close ();
156
+ }
157
+ }
136
158
137
159
@ Test
138
160
public void shouldSelectListOfBlogsUsingXMLConfig () {
You can’t perform that action at this time.
0 commit comments