public async Task UpdateMovie_Success_TestMethod() { var movieUpdateCommand = this.MovieUpdateCommandData(); // Repository Setup movieUpdateRepositoryMock .Setup((r) => r.UpdateAsync(It.IsAny <MovieModel>())) .ReturnsAsync(true); var response = await movieUpdateCommandHandler.HandleAsync(movieUpdateCommand); Assert.IsTrue(Convert.ToBoolean(response)); }
async Task <IActionResult> IApiCommandHandler <MovieUpdateCommand> .HandleAsync(ControllerBase controllerBase, MovieUpdateCommand command) { try { if (command == null) { return(controllerBase?.BadRequest()); } return(controllerBase?.Ok(await movieUpdateCommandHandler?.HandleAsync(command))); } catch { throw; } }