public async Task CreateAsync_ShouldWorkProperly_WithCorrectData() { var title = "My awesome new Post"; var slug = "my-awesome-new-post"; var shortDescription = "This blog is all about awesomeness 🤗!"; var content = "Another blog post shared on internet"; var created = await blogPostAdminAppService.CreateAsync(new CreateBlogPostDto { BlogId = cmsKitTestData.Blog_Id, Title = title, Slug = slug, ShortDescription = shortDescription, Content = content }); created.Id.ShouldNotBe(Guid.Empty); var blogPost = await blogPostRepository.GetAsync(created.Id); blogPost.Title.ShouldBe(title); blogPost.Slug.ShouldBe(slug); blogPost.ShortDescription.ShouldBe(shortDescription); blogPost.Content.ShouldBe(content); }
public virtual Task <BlogPostDto> CreateAsync(CreateBlogPostDto input) { return(BlogPostAdminAppService.CreateAsync(input)); }