public void PopFromRedisTest() { Redishelper.Delete("testRedisList"); Redishelper.Push("testRedisList", "test1"); Redishelper.Push("testRedisList", "test2"); var popObject = Redishelper.Pop <string>("testRedisList"); Assert.AreEqual(popObject, "test1"); }
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); }
public void PushToRedisTest() { Redishelper.Delete("testRedisList"); Redishelper.Push("testRedisList", new AAGetModel()); //Assert.AreEqual(resultnumber,1); }