public async Task AddActorToMovieAsync() { _mockingHelper.RepositoryMovie.Setup(_ => _.AddActorToMovieAsync(It.IsAny <long>(), It.IsAny <long>())); await _movieService.AddActorToMovieAsync(1L, 13L); _mockingHelper.RepositoryMovie.Verify(_ => _.AddActorToMovieAsync(It.IsAny <long>(), It.IsAny <long>()), Times.Once); }
public async Task <IActionResult> AddActor(Guid id, [FromBody] AddActorToMovieDto addActor) { var actor = await _movieService.AddActorToMovieAsync(id, addActor); if (actor == null) { return(NotFound()); } return(Ok(actor)); }