// Path: src/main/java/com/elong/pb/newdda/client/router/rule/ShardingRule.java
// public class ShardingRule {
// 
//     //默认mysql数据类型也可以配置
//     private DatabaseType databaseType = DatabaseType.MySQL;
// 
//     private DataSourceContainer dataSourceContainer;
// 
//     private Algorithm algorithm;
// 
//     private List<ShardingKey> shardingKey;
// 
//     //======================================================================get  set method start ======================================================================
//     public DatabaseType getDatabaseType() {
//         return databaseType;
//     }
// 
//     public void setDatabaseType(DatabaseType databaseType) {
//         this.databaseType = databaseType;
//     }
// 
//     public List<ShardingKey> getShardingKey() {
//         return shardingKey;
//     }
// 
//     public void setShardingKey(List<ShardingKey> shardingKey) {
//         this.shardingKey = shardingKey;
//     }
// 
//     public Algorithm getAlgorithm() {
//         return algorithm;
//     }
// 
//     public void setAlgorithm(Algorithm algorithm) {
//         this.algorithm = algorithm;
//     }
// 
//     public DataSourceContainer getDataSourceContainer() {
//         return dataSourceContainer;
//     }
// 
//     public void setDataSourceContainer(DataSourceContainer dataSourceContainer) {
//         this.dataSourceContainer = dataSourceContainer;
//     }
// 
// //======================================================================get  set method end =======================================================================
// 
// }


import com.elong.pb.newdda.client.router.rule.ShardingRule;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.testng.AbstractTestNGSpringContextTests;
import org.testng.annotations.Test;
import java.sql.Connection;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
import java.util.UUID;
package com.elong.pb.newdda.client.datasource;



/**
 * 支持分片的数据源 相关测试
 * User: zhangyong
 * Date: 2016/3/29
 * Time: 20:11
 * To change this template use File | Settings | File Templates.
 */
@ContextConfiguration(locations = {"/spring/spring-config-sharding-datasource2.xml"})
public class ShardingDataSourceAndTableUnitTest extends AbstractTestNGSpringContextTests {

    @Autowired
    private ShardingDataSource shardingDataSource;

    @Autowired
// Path: src/main/java/com/elong/pb/newdda/client/router/rule/ShardingRule.java
// public class ShardingRule {
// 
//     //默认mysql数据类型也可以配置
//     private DatabaseType databaseType = DatabaseType.MySQL;
// 
//     private DataSourceContainer dataSourceContainer;
// 
//     private Algorithm algorithm;
// 
//     private List<ShardingKey> shardingKey;
// 
//     //======================================================================get  set method start ======================================================================
//     public DatabaseType getDatabaseType() {
//         return databaseType;
//     }
// 
//     public void setDatabaseType(DatabaseType databaseType) {
//         this.databaseType = databaseType;
//     }
// 
//     public List<ShardingKey> getShardingKey() {
//         return shardingKey;
//     }
// 
//     public void setShardingKey(List<ShardingKey> shardingKey) {
//         this.shardingKey = shardingKey;
//     }
// 
//     public Algorithm getAlgorithm() {
//         return algorithm;
//     }
// 
//     public void setAlgorithm(Algorithm algorithm) {
//         this.algorithm = algorithm;
//     }
// 
//     public DataSourceContainer getDataSourceContainer() {
//         return dataSourceContainer;
//     }
// 
//     public void setDataSourceContainer(DataSourceContainer dataSourceContainer) {
//         this.dataSourceContainer = dataSourceContainer;
//     }
// 
// //======================================================================get  set method end =======================================================================
// 
// }


// Path: src/test/java/com/elong/pb/newdda/client/datasource/ShardingDataSourceAndTableUnitTest.java
import com.elong.pb.newdda.client.router.rule.ShardingRule;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.testng.AbstractTestNGSpringContextTests;
import org.testng.annotations.Test;
import java.sql.Connection;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
import java.util.UUID;

package com.elong.pb.newdda.client.datasource;



/**
 * 支持分片的数据源 相关测试
 * User: zhangyong
 * Date: 2016/3/29
 * Time: 20:11
 * To change this template use File | Settings | File Templates.
 */
@ContextConfiguration(locations = {"/spring/spring-config-sharding-datasource2.xml"})
public class ShardingDataSourceAndTableUnitTest extends AbstractTestNGSpringContextTests {

    @Autowired
    private ShardingDataSource shardingDataSource;

    @Autowired
    private ShardingRule shardingRule;