public async Task GetUserById() { var userModel = new SysUser(); userModel.Id = Guid.NewGuid(); userModel.CreateTime = DateTime.Now; userModel.Account = "zhangsan"; userModel.Email = "*****@*****.**"; userModel.PassWord = "******".ToMd5Caps16(); _userRepository.AddUser(userModel); await _unitOfWork.SaveAsync(); var resultTrue = await _userRepository.GetUserByIdAsync(userModel.Id); Assert.True(resultTrue != null); var resultFalse = await _userRepository.GetUserByIdAsync(Guid.NewGuid()); Assert.False(resultFalse != null); }