コード例 #1
0
        public async Task DeleteAsync_ShouldWorkProperly_WithExistingId()
        {
            await blogPostAdminAppService.DeleteAsync(cmsKitTestData.Page_2_Id);

            var exception = await Should.ThrowAsync <EntityNotFoundException>(async() =>
                                                                              await blogPostRepository.GetAsync(cmsKitTestData.Page_2_Id));

            exception.EntityType.ShouldBe(typeof(BlogPost));
            exception.Id.ShouldBe(cmsKitTestData.Page_2_Id);
        }
コード例 #2
0
 public virtual Task DeleteAsync(Guid id)
 {
     return(BlogPostAdminAppService.DeleteAsync(id));
 }