File tree Expand file tree Collapse file tree 3 files changed +32
-26
lines changed
src/test/java/org/mybatis/spring Expand file tree Collapse file tree 3 files changed +32
-26
lines changed Original file line number Diff line number Diff line change @@ -70,15 +70,17 @@ private void startContext() {
7070
7171 @ AfterEach
7272 void assertNoMapperClass () {
73- // concrete classes should always be ignored by MapperScannerPostProcessor
74- assertBeanNotLoaded ("mapperClass" );
75-
76- // no method interfaces should be ignored too
77- assertBeanNotLoaded ("package-info" );
78- // assertBeanNotLoaded("annotatedMapperZeroMethods"); // as of 1.1.0 mappers
79- // with no methods are loaded
80-
81- applicationContext .close ();
73+ try {
74+ // concrete classes should always be ignored by MapperScannerPostProcessor
75+ assertBeanNotLoaded ("mapperClass" );
76+
77+ // no method interfaces should be ignored too
78+ assertBeanNotLoaded ("package-info" );
79+ // assertBeanNotLoaded("annotatedMapperZeroMethods"); // as of 1.1.0 mappers
80+ // with no methods are loaded
81+ } finally {
82+ applicationContext .close ();
83+ }
8284 }
8385
8486 @ Test
Original file line number Diff line number Diff line change @@ -56,15 +56,17 @@ private void startContext() {
5656
5757 @ AfterEach
5858 void assertNoMapperClass () {
59- // concrete classes should always be ignored by MapperScannerPostProcessor
60- assertBeanNotLoaded ("mapperClass" );
61-
62- // no method interfaces should be ignored too
63- assertBeanNotLoaded ("package-info" );
64- // assertBeanNotLoaded("annotatedMapperZeroMethods"); // as of 1.1.0 mappers
65- // with no methods are loaded
66-
67- applicationContext .close ();
59+ try {
60+ // concrete classes should always be ignored by MapperScannerPostProcessor
61+ assertBeanNotLoaded ("mapperClass" );
62+
63+ // no method interfaces should be ignored too
64+ assertBeanNotLoaded ("package-info" );
65+ // assertBeanNotLoaded("annotatedMapperZeroMethods"); // as of 1.1.0 mappers
66+ // with no methods are loaded
67+ } finally {
68+ applicationContext .close ();
69+ }
6870 }
6971
7072 @ Test
Original file line number Diff line number Diff line change @@ -71,14 +71,16 @@ private void startContext() {
7171
7272 @ AfterEach
7373 void assertNoMapperClass () {
74- // concrete classes should always be ignored by MapperScannerPostProcessor
75- assertBeanNotLoaded ("mapperClass" );
76-
77- // no method interfaces should be ignored too
78- assertBeanNotLoaded ("package-info" );
79- // assertBeanNotLoaded("annotatedMapperZeroMethods"); // as of 1.1.0 mappers with no methods are loaded
80-
81- applicationContext .close ();
74+ try {
75+ // concrete classes should always be ignored by MapperScannerPostProcessor
76+ assertBeanNotLoaded ("mapperClass" );
77+
78+ // no method interfaces should be ignored too
79+ assertBeanNotLoaded ("package-info" );
80+ // assertBeanNotLoaded("annotatedMapperZeroMethods"); // as of 1.1.0 mappers with no methods are loaded
81+ } finally {
82+ applicationContext .close ();
83+ }
8284 }
8385
8486 @ Test
You can’t perform that action at this time.
0 commit comments