public async Task GetAllMovies_returns_transfer_objects_as_content( Movie[] movies, InMemoryMovieRepository readerStub, [NoAutoProperties] QueriesController sut) { movies.ForEach(t => readerStub.Data[t.Id] = t); var facade = new MovieReadModelFacade(readerStub); var actual = (OkObjectResult)await sut.GetAllMovies(facade); actual.Value.Should().BeEquivalentTo(await facade.GetAllMovies()); }
public async Task <IActionResult> GetAllMovies( [FromServices] MovieReadModelFacade readModelFacade) { return(Ok(await readModelFacade.GetAllMovies())); }