Esempio n. 1
0
        public async Task Should_Get_List()
        {
            // Arrange
            Venue venue = VenueSeedData.WeiherhofSchule;

            Microsoft.EntityFrameworkCore.DbSet <Venue> mockVenues = MockDbSets.Venues;
            mockVenues.FindAsync(Arg.Any <Guid>()).Returns(venue);
            _arpaContext.Venues.Returns(mockVenues);

            // Act
            IImmutableList <Room> result = await _handler.Handle(
                new Rooms.Query(venue.Id),
                new CancellationToken());

            // Assert
            result.Should().BeEquivalentTo(venue.Rooms);
        }