Ejemplo n.º 1
0
        public void PopFromRedisTest()
        {
            Redishelper.Delete("testRedisList");
            Redishelper.Push("testRedisList", "test1");
            Redishelper.Push("testRedisList", "test2");
            var popObject = Redishelper.Pop <string>("testRedisList");

            Assert.AreEqual(popObject, "test1");
        }
Ejemplo n.º 2
0
        public void RedisToApi()
        {
            Redishelper.Delete("SortingList");
            var peroidLists = SqlDal.GetPeriodAAModelList();

            if (peroidLists.Count <= 0)
            {
                return;
            }
            Redishelper.PushList <AAGetModel>("SortingList", peroidLists);
            var peroidListsPop = Redishelper.PopList <AAGetModel>("SortingList", Convert.ToInt16(ConfigurationManager.AppSettings["OncRedisPopNumber"]));
            var a = peroidListsPop.First();

            Assert.IsNotNull(a.BillNumber);
        }
Ejemplo n.º 3
0
 public void PushToRedisTest()
 {
     Redishelper.Delete("testRedisList");
     Redishelper.Push("testRedisList", new AAGetModel());
     //Assert.AreEqual(resultnumber,1);
 }