コード例 #1
0
        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());
        }
コード例 #2
0
 public async Task <IActionResult> GetAllMovies(
     [FromServices] MovieReadModelFacade readModelFacade)
 {
     return(Ok(await readModelFacade.GetAllMovies()));
 }