public async Task DraftAsync_ShouldWorkProperly()
    {
        var newPost = await CreateBlogPost();

        newPost.Status.ShouldBe(BlogPostStatus.Draft);

        await blogPostAdminAppService.PublishAsync(newPost.Id);

        var post = await blogPostAdminAppService.GetAsync(newPost.Id);

        post.Status.ShouldBe(BlogPostStatus.Published);

        await blogPostAdminAppService.DraftAsync(newPost.Id);

        post = await blogPostAdminAppService.GetAsync(newPost.Id);

        post.Status.ShouldBe(BlogPostStatus.Draft);
    }
Beispiel #2
0
 public virtual Task DraftAsync(Guid id)
 {
     return(BlogPostAdminAppService.DraftAsync(id));
 }