public async Task TaskService_UpdateAsync_Should_UpdateRepository()
        {
            var mockUnitOfWork     = new Mock <IUnitOfWork>();
            var mockTaskRepository = new MockTaskRepository()
                                     .MockFindByIdAsync(Task.FromResult(Generics.Task))
                                     .MockUpdate();

            var taskService = new TaskService(mockTaskRepository.Object, mockUnitOfWork.Object);

            var results = await taskService.UpdateAsync(1, Generics.Task);

            Assert.IsNotNull(results);
            Assert.IsTrue(results.Success);
            Assert.IsInstanceOfType(results.Task, typeof(Domain.Models.Task));
            mockTaskRepository.VerifyFindByIdAsync(Times.Once());
            mockTaskRepository.VerifyUpdate(Times.Once());
        }
        public async Task TaskService_UpdateAsync_InputInvalid_Should_ReturnBadResponse()
        {
            var mockUnitOfWork     = new Mock <IUnitOfWork>();
            var mockTaskRepository = new MockTaskRepository()
                                     .MockFindByIdAsync(Task.FromResult(Generics.Task))
                                     .MockUpdateInvalid();

            var taskService = new TaskService(mockTaskRepository.Object, mockUnitOfWork.Object);

            var results = await taskService.UpdateAsync(1, Generics.Task);

            Assert.IsNotNull(results);
            Assert.IsNull(results.Task);
            Assert.IsFalse(results.Success);
            Assert.IsTrue(results.Message.Contains("An error occurred when updating the task:"));
            mockTaskRepository.VerifyFindByIdAsync(Times.Once());
            mockTaskRepository.VerifyUpdate(Times.Once());
        }
        public async Task TaskService_UpdateAsync_InputNotFound_Should_ReturnBadResponse()
        {
            var mockUnitOfWork     = new Mock <IUnitOfWork>();
            var mockTaskRepository = new MockTaskRepository()
                                     .MockFindByIdAsyncInvalid()
                                     .MockUpdate();

            var taskService = new TaskService(mockTaskRepository.Object, mockUnitOfWork.Object);

            var results = await taskService.UpdateAsync(1, Generics.Task);

            Assert.IsNotNull(results);
            Assert.IsNull(results.Task);
            Assert.IsFalse(results.Success);
            Assert.IsTrue(results.Message == Generics.TaskResponseNotFound);
            mockTaskRepository.VerifyFindByIdAsync(Times.Once());
            mockTaskRepository.VerifyUpdate(Times.Never());
        }