Esempio n. 1
0
        public async void TopicRepository_Search_Test()
        {
            // Arrange
            var context         = GetContext("TopicRepository_FindList_Test");
            var topicRepository = new TopicRepository(context);

            await context.Topic.AddRangeAsync(new Topic("topic1"), new Topic("topic2"), new Topic("topic3"), new Topic("topic4"), new Topic("topic5"));

            await context.SaveChangesAsync();

            // Act
            var paged = await topicRepository.Search(new TopicSearch()
            {
                PageSize = 2
            });

            // Assert
            Assert.Equal(2, paged.Records.Count());
        }