Esempio n. 1
0
        public void Test_Update_ShardStrategy()
        {
            long shardId = 1000;

            var shardStrategy = new ShardStrategyRepository();
            shardStrategy.UpdateShardStrategy(shardId);
        }
Esempio n. 2
0
        public void Test_add_ShardStrategy()
        {
            long shardId = 1001;
            int totaCount = 0;
            int maxCount = 5;

            var shardStrategy = new ShardStrategyRepository();
            shardStrategy.AddShardStrategy(shardId ,totaCount ,maxCount );
        }
Esempio n. 3
0
        public void GetShardById_Test()
        {
            var shardId = 1000;
            var shardRep = new ShardStrategyRepository();
            var shardWile = shardRep.GetShardStrategyById(1000);

            Assert.AreEqual(1,shardWile.Count,"Shard count equal to 1 fro CXC");
            Assert.AreEqual(5,shardWile[0].TotalCount,"Total count of Shardwile updated to 5");
        }
Esempio n. 4
0
 /// <summary>
 /// Get the shard strategy by shard id
 /// </summary>
 /// <param name="shardId"></param>
 /// <returns></returns>
 public IList<ShardWile> GetShardStrategyById(long shardId)
 {
     var shardStrategy = new ShardStrategyRepository();
     return shardStrategy.GetShardStrategyById(shardId);
 }
Esempio n. 5
0
 /// <summary>
 /// Get all the shards strategy
 /// </summary>
 /// <returns></returns>
 public IList<ShardWile> GetShardStrategy()
 {
     var shardStrategy = new ShardStrategyRepository();
     return shardStrategy.GetShardStrategy();
 }
Esempio n. 6
0
 /// <summary>
 /// Updates the shard wile
 /// </summary>
 /// <param name="shardId"></param>
 public void UpdateShardWile(long shardId)
 {
     var shardStrategy = new ShardStrategyRepository();
     shardStrategy.UpdateShardStrategy(shardId);
 }