Skip to content

Commit 7c2e2d4

Browse files
committed
Polishing
1 parent d8e624e commit 7c2e2d4

File tree

1 file changed

+5
-14
lines changed

1 file changed

+5
-14
lines changed

spring-jdbc/src/test/java/org/springframework/jdbc/datasource/DataSourceTransactionManagerTests.java

Lines changed: 5 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -48,18 +48,8 @@
4848
import org.springframework.transaction.support.TransactionSynchronizationManager;
4949
import org.springframework.transaction.support.TransactionTemplate;
5050

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.*;
6353

6454
/**
6555
* @author Juergen Hoeller
@@ -225,7 +215,7 @@ private void doTestTransactionRollbackRestoringAutoCommit(
225215

226216
final DataSource dsToUse = (lazyConnection ? new LazyConnectionDataSourceProxy(ds) : ds);
227217
tm = new DataSourceTransactionManager(dsToUse);
228-
TransactionTemplate tt = new TransactionTemplate(tm);
218+
TransactionTemplate tt = new TransactionTemplate(tm);
229219
assertTrue("Hasn't thread connection", !TransactionSynchronizationManager.hasResource(dsToUse));
230220
assertTrue("Synchronization not active", !TransactionSynchronizationManager.isSynchronizationActive());
231221

@@ -1259,7 +1249,8 @@ protected void doInTransactionWithoutResult(TransactionStatus status) throws Run
12591249
assertTrue("Hasn't thread connection", !TransactionSynchronizationManager.hasResource(ds));
12601250
}
12611251

1262-
@Test public void testTransactionWithPropagationNotSupported() throws Exception {
1252+
@Test
1253+
public void testTransactionWithPropagationNotSupported() throws Exception {
12631254
TransactionTemplate tt = new TransactionTemplate(tm);
12641255
tt.setPropagationBehavior(TransactionDefinition.PROPAGATION_NOT_SUPPORTED);
12651256
assertTrue("Hasn't thread connection", !TransactionSynchronizationManager.hasResource(ds));

0 commit comments

Comments
 (0)