Example #1
0
        public async Task GetPostsForBatchAsync_should_return_4_posts_with_titles_sequence_NH_OH_N_3_after_first_batch()
        {
            //arrange
            await TestDataInitializer.Init_3HP_3NP_Posts(_context);

            //act
            var result = await _postService.GetPostsForBatchAsync(DateTime.Now.AddDays(-13), _context.Posts.First(p => p.Title == "1").CreatedDate);

            //assert
            Assert.Equal(result[0].Title, "NH");
            Assert.Equal(result[1].Title, "OH");
            Assert.Equal(result[2].Title, "N");
            Assert.Equal(result[3].Title, "3");
        }