Exemple #1
0
        public async void TopicRepository_FindList_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 list = await topicRepository.FindList(new TopicSearch()
            {
                Name = "topic1"
            });

            // Assert
            //	Assert.Single(list);
            Assert.True(list.ElementAt(0).Name == "topic1");
        }