public void CurrentSessionDao_Update()
        {
            CurrentSessionDto dto = new CurrentSessionDto();

            dto.UserId            = "002";
            dto.LastOperationTime = DateTime.Now;
            dto.SignInTime        = DateTime.Now;
            dto.EntityStatus      = EntityStatusType.IsActive;
            dto.CreatedTime       = DateTime.Now;
            CurrentSessionDao dao = new CurrentSessionDao();

            string result = dao.Update(dto);

            Assert.IsTrue(dto.Id == result);
        }
예제 #2
0
        public void CurrentSessionDao_Update()
        {
            CurrentSessionDto dto = new CurrentSessionDto()
            {
                Id                = Guid.NewGuid().ToString(),
                UserId            = "1111",
                LastOperationTime = DateTime.Now,
                SignInTime        = DateTime.Now,
                EntityStatus      = EntityStatusType.IsActive,
                CreatedTime       = DateTime.Now,
            };

            CurrentSessionDao dao = new CurrentSessionDao();

            dao.Create(dto);
            dto.EntityStatus = EntityStatusType.IsBlocked;
            dao.Update(dto);
            Assert.IsTrue(dao.Read(dto.Id).EntityStatus == EntityStatusType.IsBlocked);
        }