Esempio n. 1
0
        public async Task GetAllTheaters_sort_transfer_objects_by_CreatedAt(
            ImmutableArray <Theater> entities,
            InMemoryTheaterRepository readerStub)
        {
            entities.ForEach(x => readerStub.Data[x.Id] = x);
            var sut = new TheaterReadModelFacade(readerStub);

            ImmutableArray <TheaterDto> actual = await sut.GetAllTheaters();

            actual.Should().BeInDescendingOrder(x => x.CreatedAt);
        }
Esempio n. 2
0
        public async Task GetAllTheaters_assembles_all_transfer_objects_correctly(
            ImmutableArray <Theater> entities,
            InMemoryTheaterRepository readerStub)
        {
            entities.ForEach(x => readerStub.Data[x.Id] = x);
            var sut = new TheaterReadModelFacade(readerStub);

            ImmutableArray <TheaterDto> actual = await sut.GetAllTheaters();

            actual.Should().BeEquivalentTo(
                expectation: entities,
                opts => opts.ExcludingMissingMembers());
        }