示例#1
0
    public async Task GetBySlugAsync_ShouldWorkProperly_WithCorrectParameters()
    {
        var blogPost = await blogPostRepository.GetBySlugAsync(testData.Blog_Id, testData.BlogPost_1_Slug);

        blogPost.ShouldNotBeNull();
        blogPost.Id.ShouldBe(testData.BlogPost_1_Id);
        blogPost.Slug.ShouldBe(testData.BlogPost_1_Slug);
    }
示例#2
0
        public virtual async Task <BlogPostDto> GetBySlugAsync(string blogSlug, string blogPostSlug)
        {
            var blog = await BlogRepository.GetBySlugAsync(blogSlug);

            var blogPost = await BlogPostRepository.GetBySlugAsync(blog.Id, blogPostSlug);

            return(MapToGetOutputDto(blogPost));
        }