示例#1
0
        public async Task BlogCreate_ShouldWorkProperly()
        {
            var blog = await BlogManager.CreateAsync("test-name", "test-slug");

            blog.ShouldNotBeNull();
            blog.Id.ShouldNotBe(Guid.Empty);
        }
示例#2
0
 public async Task BlogCreate_ShouldThrowException_WithExistSlug()
 {
     await Should.ThrowAsync <BlogSlugAlreadyExistException>(
         async() =>
         await BlogManager.CreateAsync("test-name", TestData.BlogSlug)
         );
 }