Пример #1
0
        public void Perform()
        {
            var obj = MemberDealLogDTO.New();

            //Console.WriteLine($"Start test {count} times:");

            /*RuiConfig.Entity<MemberDealLogDTO>()
             *  .Prop("µ÷Õû½ð¶î", x => x.AdjustAmount)
             *  .OtherPropExc();
             *
             * var res = RuiFacade.ToListVm(new List<MemberDealLogDTO> {obj});
             *
             * Assert.NotNull(res);
             * Console.WriteLine(JsonConvert.SerializeObject(res));*/
        }
Пример #2
0
        public void Perform()
        {
            var obj = new MemberDealLogDTO
            {
                TransactionId    = 1001,
                RelatedTranId    = 111,
                MerchantId       = 222,
                BrandId          = 333,
                MemberId         = 444,
                MemberCardId     = 555,
                CardType         = DayOfWeek.Sunday,
                DealType         = HttpResponseHeader.CacheControl,
                TotalPrice       = 66,
                ServiceFee       = 0,
                AdjustAmount     = 777,
                OperClerkId      = 888,
                OperMerchantId   = 999,
                OperDepartmentId = 100,
                CreateTime       = DateTime.Now,
                LastUpdateTime   = DateTime.Now,
                Remark           = "test remark"
            };

            const int count = 2;

            Console.WriteLine($"Start test {count} times:");

            CacheService.Set("testData", obj, TimeSpan.FromDays(30));

            TestUtil.RunWatch("Get cache", () =>
            {
                for (var i = 0; i < count; i++)
                {
                    var res = CacheService.Get <MemberDealLogDTO>("testData");
                    Assert.NotNull(res);
                }
            });
        }