public async Task CreatePost_Test() { await _postAppService.CreateOrUpdate(new CreateOrUpdatePostInput { Post = new PostEditDto { Url = "test", CoverImage = "test", Title = "test", Content = "test", // 枚举类型需要自己添加完善 } }); await UsingDbContextAsync(async context => { var dystopiaPost = await context.Posts.FirstOrDefaultAsync(); dystopiaPost.ShouldNotBeNull(); } ); }