public void TestMultiShardConnectionConstructorEvaluatesShards()
        {
            MultiShardTestUtils.DropAndCreateDatabases();
            ShardMap shardMap = MultiShardTestUtils.CreateAndGetTestShardMap();

            List <Shard> shards = shardMap.GetShards().ToList();

            MultiShardConnection conn = new MultiShardConnection(shards.ToConsumable(), dummyConnectionString);

            AssertExtensions.AssertSequenceEqual(shards, conn.Shards);
        }
Esempio n. 2
0
 public static void MyClassInitialize(TestContext testContext)
 {
     // Drop and recreate the test databases, tables, and data that we will use to verify
     // the functionality.
     // For now I have hardcoded the server location and database names.  A better approach would be
     // to make the server location configurable and the database names be guids.
     // Not the top priority right now, though.
     //
     SqlConnection.ClearAllPools();
     MultiShardTestUtils.DropAndCreateDatabases();
     MultiShardTestUtils.CreateAndPopulateTables();
 }