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() {
70
70
71
71
@ After
72
72
public 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
+ }
82
84
}
83
85
84
86
@ Test
Original file line number Diff line number Diff line change @@ -56,15 +56,17 @@ private void startContext() {
56
56
57
57
@ After
58
58
public 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
+ }
68
70
}
69
71
70
72
@ Test
Original file line number Diff line number Diff line change @@ -71,14 +71,16 @@ private void startContext() {
71
71
72
72
@ After
73
73
public 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
+ }
82
84
}
83
85
84
86
@ Test
You can’t perform that action at this time.
0 commit comments