|
48 | 48 | import org.springframework.transaction.support.TransactionSynchronizationManager; |
49 | 49 | import org.springframework.transaction.support.TransactionTemplate; |
50 | 50 |
|
51 | | -import static org.junit.Assert.assertEquals; |
52 | | -import static org.junit.Assert.assertFalse; |
53 | | -import static org.junit.Assert.assertNull; |
54 | | -import static org.junit.Assert.assertSame; |
55 | | -import static org.junit.Assert.assertTrue; |
56 | | -import static org.junit.Assert.fail; |
57 | | -import static org.mockito.BDDMockito.given; |
58 | | -import static org.mockito.BDDMockito.inOrder; |
59 | | -import static org.mockito.BDDMockito.mock; |
60 | | -import static org.mockito.BDDMockito.times; |
61 | | -import static org.mockito.BDDMockito.verify; |
62 | | -import static org.mockito.BDDMockito.willThrow; |
| 51 | +import static org.junit.Assert.*; |
| 52 | +import static org.mockito.BDDMockito.*; |
63 | 53 |
|
64 | 54 | /** |
65 | 55 | * @author Juergen Hoeller |
@@ -225,7 +215,7 @@ private void doTestTransactionRollbackRestoringAutoCommit( |
225 | 215 |
|
226 | 216 | final DataSource dsToUse = (lazyConnection ? new LazyConnectionDataSourceProxy(ds) : ds); |
227 | 217 | tm = new DataSourceTransactionManager(dsToUse); |
228 | | - TransactionTemplate tt = new TransactionTemplate(tm); |
| 218 | + TransactionTemplate tt = new TransactionTemplate(tm); |
229 | 219 | assertTrue("Hasn't thread connection", !TransactionSynchronizationManager.hasResource(dsToUse)); |
230 | 220 | assertTrue("Synchronization not active", !TransactionSynchronizationManager.isSynchronizationActive()); |
231 | 221 |
|
@@ -1259,7 +1249,8 @@ protected void doInTransactionWithoutResult(TransactionStatus status) throws Run |
1259 | 1249 | assertTrue("Hasn't thread connection", !TransactionSynchronizationManager.hasResource(ds)); |
1260 | 1250 | } |
1261 | 1251 |
|
1262 | | - @Test public void testTransactionWithPropagationNotSupported() throws Exception { |
| 1252 | + @Test |
| 1253 | + public void testTransactionWithPropagationNotSupported() throws Exception { |
1263 | 1254 | TransactionTemplate tt = new TransactionTemplate(tm); |
1264 | 1255 | tt.setPropagationBehavior(TransactionDefinition.PROPAGATION_NOT_SUPPORTED); |
1265 | 1256 | assertTrue("Hasn't thread connection", !TransactionSynchronizationManager.hasResource(ds)); |
|
0 commit comments