Search in sources :

Example 1 with TransactionLogDataSource

use of com.dangdang.ddframe.rdb.transaction.soft.datasource.TransactionLogDataSource in project sharding-jdbc by dangdangdotcom.

the class TransactionLogStorageFactoryTest method assertCreateRdbTransactionLogStorageFactory.

@Test
public void assertCreateRdbTransactionLogStorageFactory() {
    DataSource dataSource = mock(DataSource.class);
    TransactionLogDataSource transactionLogDataSource = new RdbTransactionLogDataSource(dataSource);
    assertThat(TransactionLogStorageFactory.createTransactionLogStorage(transactionLogDataSource), instanceOf(TransactionLogStorage.class));
}
Also used : RdbTransactionLogDataSource(com.dangdang.ddframe.rdb.transaction.soft.datasource.impl.RdbTransactionLogDataSource) MemoryTransactionLogDataSource(com.dangdang.ddframe.rdb.transaction.soft.datasource.impl.MemoryTransactionLogDataSource) TransactionLogDataSource(com.dangdang.ddframe.rdb.transaction.soft.datasource.TransactionLogDataSource) RdbTransactionLogDataSource(com.dangdang.ddframe.rdb.transaction.soft.datasource.impl.RdbTransactionLogDataSource) MemoryTransactionLogDataSource(com.dangdang.ddframe.rdb.transaction.soft.datasource.impl.MemoryTransactionLogDataSource) DataSource(javax.sql.DataSource) TransactionLogDataSource(com.dangdang.ddframe.rdb.transaction.soft.datasource.TransactionLogDataSource) RdbTransactionLogDataSource(com.dangdang.ddframe.rdb.transaction.soft.datasource.impl.RdbTransactionLogDataSource) Test(org.junit.Test)

Example 2 with TransactionLogDataSource

use of com.dangdang.ddframe.rdb.transaction.soft.datasource.TransactionLogDataSource in project sharding-jdbc by dangdangdotcom.

the class TransactionLogStorageFactoryTest method assertCreateMemoryTransactionLogStorageFactory.

@Test
public void assertCreateMemoryTransactionLogStorageFactory() {
    TransactionLogDataSource transactionLogDataSource = new MemoryTransactionLogDataSource();
    assertThat(TransactionLogStorageFactory.createTransactionLogStorage(transactionLogDataSource), instanceOf(TransactionLogStorage.class));
}
Also used : MemoryTransactionLogDataSource(com.dangdang.ddframe.rdb.transaction.soft.datasource.impl.MemoryTransactionLogDataSource) MemoryTransactionLogDataSource(com.dangdang.ddframe.rdb.transaction.soft.datasource.impl.MemoryTransactionLogDataSource) TransactionLogDataSource(com.dangdang.ddframe.rdb.transaction.soft.datasource.TransactionLogDataSource) RdbTransactionLogDataSource(com.dangdang.ddframe.rdb.transaction.soft.datasource.impl.RdbTransactionLogDataSource) Test(org.junit.Test)

Aggregations

TransactionLogDataSource (com.dangdang.ddframe.rdb.transaction.soft.datasource.TransactionLogDataSource)2 MemoryTransactionLogDataSource (com.dangdang.ddframe.rdb.transaction.soft.datasource.impl.MemoryTransactionLogDataSource)2 RdbTransactionLogDataSource (com.dangdang.ddframe.rdb.transaction.soft.datasource.impl.RdbTransactionLogDataSource)2 Test (org.junit.Test)2 DataSource (javax.sql.DataSource)1