public async Task Should_Update_A_Blog() { var newDescription = "new description"; var oldBlog = (await _blogManagementAppService.GetListAsync()).Items.FirstOrDefault();; await _blogManagementAppService.UpdateAsync(oldBlog.Id, new UpdateBlogDto() { Description = newDescription, Name = oldBlog.Name, ShortName = oldBlog.ShortName }); UsingDbContext(context => { var blog = context.Blogs.FirstOrDefault(q => q.Id == oldBlog.Id); blog.Description.ShouldBe(newDescription); }); }
public async Task <ListResultDto <BlogDto> > GetListAsync() { return(await _blogManagementAppService.GetListAsync()); }