常用方法
常用方法
常用方法
常用方法
public async Task AddTest() { var fakeRepository = Mock.Of <IPostRepository>(); var PostService = new PostService(fakeRepository); var Post = new Post() { Id = 1, Description = "This is my description", CreatedAt = DateTime.Parse("2019-05-05"), ProfileId = 1 }; await PostService.AddAndSafe(Post); }