public void ShouldFindMovie() { var movieTask = Task.Run <Movie>(async() => await movieBL.SearchAsync("Test", unitOfWork)); var movie = movieTask.Result; Assert.IsNotNull(movie); }
public async Task <IActionResult> PostMovie([FromBody] SearchMovieRequest request) { Movie movie = null; using (var uow = unitOfWorkFactory.CreateNew()) { movie = await movieBL.SearchAsync(request.SearchText, uow); } return(Ok(movie)); }