Пример #1
0
        public async Task Handler_Returns_Requested_Count()
        {
            await InitializeRecords();

            var query = new AlbumGetLatestAddedQuery(1);

            var result = await _handler.Handle(query);

            result.Albums.Should().HaveCount(query.ItemCount);
        }
Пример #2
0
        public AlbumGetLatestAddedQueryHandlerTests()
        {
            _fixture = new Fixture();
            _fixture.Behaviors.Add(new OmitOnRecursionBehavior());

            _context = InitializeDatabase();

            _testQuery = new AlbumGetLatestAddedQuery(5);

            _handler = new AlbumGetLatestAddedQueryHandler(_context);
        }
Пример #3
0
        public void Query_Sets_Default_Item_Count_For_Zero()
        {
            var query = new AlbumGetLatestAddedQuery(0);

            query.ItemCount.Should().BeGreaterThan(0);
        }