public async Task UpdateUserShouldThrowException()
        {
            string      userId   = "John";
            UserProfile user     = null;
            var         mockRepo = new Mock <IUserRepository>();

            mockRepo.Setup(repo => repo.GetUser(userId)).Returns(Task.FromResult(user));
            var service = new UserService.Services.UserService(mockRepo.Object);

            var actual = await Assert.ThrowsAsync <UserNotFoundException>(() => service.UpdateUser(userId, user));

            Assert.Equal($"This user id doesn't exist", actual.Message);
        }
        public async Task UpdateUserShouldSuccess()
        {
            string      userId = "Jack";
            UserProfile user   = new UserProfile {
                UserId = "Jack", FirstName = "Jackson", LastName = "James", Contact = "9812345670", Email = "*****@*****.**", CreatedAt = DateTime.Now
            };
            var mockRepo = new Mock <IUserRepository>();

            mockRepo.Setup(repo => repo.GetUser(userId)).Returns(Task.FromResult(user));
            mockRepo.Setup(repo => repo.UpdateUser(user)).Returns(Task.FromResult(true));
            var service = new UserService.Services.UserService(mockRepo.Object);

            user.Contact = "9888776655";
            user.Email   = "*****@*****.**";
            var actual = await service.UpdateUser(userId, user);

            Assert.True(actual);
        }