public async Task Handler_Returns_Requested_Count()
        {
            await InitializeRecords();

            var query = new MovieGetLatestAddedQuery(1);

            var result = await _handler.Handle(query);

            result.Movies.Should().HaveCount(query.ItemCount);
        }
        public MovieGetLatestAddedQueryHandlerTests()
        {
            _fixture = new Fixture();
            _fixture.Behaviors.Add(new OmitOnRecursionBehavior());

            _context = InitializeDatabase();

            _testQuery = new MovieGetLatestAddedQuery(5);

            _handler = new MovieGetLatestAddedQueryHandler(_context);
        }
Beispiel #3
0
        public void Query_Sets_Default_Item_Count_For_Zero()
        {
            var query = new MovieGetLatestAddedQuery(0);

            query.ItemCount.Should().BePositive();
        }