Skip to content

Commit fc97b3b

Browse files
committed
Add test for MapperRegistry
1 parent 2e29049 commit fc97b3b

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/test/java/org/apache/ibatis/binding/BindingTest.java

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424

2525
import java.lang.reflect.Method;
2626
import java.util.ArrayList;
27+
import java.util.Collection;
2728
import java.util.Collections;
2829
import java.util.HashMap;
2930
import java.util.Iterator;
@@ -787,4 +788,12 @@ public void executeWithCursorAndRowBounds() {
787788
}
788789
}
789790

791+
@Test
792+
public void registeredMappers() {
793+
Collection<Class<?>> mapperClasses = sqlSessionFactory.getConfiguration().getMapperRegistry().getMappers();
794+
assertEquals(2, mapperClasses.size());
795+
assertTrue(mapperClasses.contains(BoundBlogMapper.class));
796+
assertTrue(mapperClasses.contains(BoundAuthorMapper.class));
797+
}
798+
790799
}

0 commit comments

Comments
 (0)