@ContextConfiguration(value="/META-INF/dbunit-context.xml")
@TestExecutionListeners(value={org.springframework.test.context.support.DependencyInjectionTestExecutionListener.class,com.github.springtestdbunit.TransactionDbUnitTestExecutionListener.class})
@DbUnitConfiguration(databaseConnection={"dataSource","dataSource2"})
@DatabaseSetup(value="/META-INF/db/insert.xml") @DatabaseSetup(connection="dataSource2",value="/META-INF/db/multi-insert.xml")
@Transactional
public class MultiConnectionTest
extends Object
| Constructor and Description |
|---|
MultiConnectionTest() |
| Modifier and Type | Method and Description |
|---|---|
void |
testExpected() |
void |
testInsert() |
void |
testRefresh() |
@DatabaseSetup(value="/META-INF/db/insert2.xml",type=INSERT) @DatabaseSetup(connection="dataSource2",value="/META-INF/db/multi-insert2.xml",type=INSERT) public void testInsert() throws Exception
Exception@DatabaseSetup(value="/META-INF/db/refresh.xml",type=REFRESH) @DatabaseSetup(connection="dataSource2",value="/META-INF/db/multi-refresh.xml",type=REFRESH) public void testRefresh() throws Exception
Exception@ExpectedDatabase(connection="dataSource2", value="/META-INF/db/multi-expected.xml") public void testExpected() throws Exception
ExceptionCopyright © 2016. All rights reserved.