public async Task GetBlogElementAsyncNullTest() { var contentService = new BlogContentService( new DbBlogRepositoryBuilder() .WithBlogElement(null) .Build()); var result = await contentService.GetBlogElementAsync(0); result.Should().BeNull(); }
public async Task GetBlogElementAsyncTest() { var blogElement = new BlogElementBuilder().Build(); var contentService = new BlogContentService( new DbBlogRepositoryBuilder() .WithBlogElement(blogElement) .Build()); var result = await contentService.GetBlogElementAsync(123); result.Should().NotBeNull(); result.Should().Equals(blogElement); }