public async Task GetAllTheaters_returns_transfer_objects_as_content(
            Theater[] theaters,
            InMemoryTheaterRepository readerStub,
            [NoAutoProperties] QueriesController sut)
        {
            theaters.ForEach(t => readerStub.Data[t.Id] = t);
            var facade = new TheaterReadModelFacade(readerStub);

            var actual = (OkObjectResult)await sut.GetAllTheaters(facade);

            actual.Value.Should().BeEquivalentTo(await facade.GetAllTheaters());
        }
Example #2
0
 public async Task <IActionResult> GetAllTheaters(
     [FromServices] TheaterReadModelFacade readModelFacade)
 {
     return(Ok(await readModelFacade.GetAllTheaters()));
 }