public void ShouldGetIndividualShardlet() { //assemble var driver = new AzureShardSetConnectionDriver(); var shardSetConfig = GetShardSetConfig(); InsertTestShardlets(driver, 10); // act (should be in cache) const string shardingKey = "1"; var distributionKey = GetDistributionKey(shardingKey); var shardlet = driver.GetShardletByShardingKey(shardSetConfig.ShardSetName, shardingKey, distributionKey); //assert Assert.IsNotNull(shardlet); Assert.AreEqual(shardingKey, shardlet.ShardingKey); Assert.AreEqual(distributionKey, shardlet.DistributionKey); // act (no caching) AzureCache.Clear(); shardlet = driver.GetShardletByShardingKey(shardSetConfig.ShardSetName, shardingKey, distributionKey); //assert Assert.IsNotNull(shardlet); Assert.AreEqual(shardingKey, shardlet.ShardingKey); Assert.AreEqual(distributionKey, shardlet.DistributionKey); }
public void TestInitialize() { AzureShardSetConnectionDriver.InitializeAzureTables(_testShardSetName, true); AzureShardSetConnectionDriver.InitializeAzureTables(); AzureCache.Clear(); }
public void T0_ClearCache() { AzureCache.Clear(); }