public void UpdateAuthor() { string authorId; CreateAuthorHelper(out authorId, out _); string bookId = _authorService.GetAuthor(authorId).Books.First().Id; var updateAuthor = ObjectMocks.GetAuthorForUpdate(authorId, bookId); _authorService.UpdateAuthor(updateAuthor); var updatedAuthor = _authorService.GetAuthor(authorId); Assert.Contains(updateAuthor.LastName, updatedAuthor.Name); DeleteAuthorHelper(authorId); }
public void UpdateAuthor() { string authorId; AuthorForCreationDto author; CreateAuthorHelper(out author, out authorId); var updateAuthor = ObjectMocks.GetAuthorForUpdate(); _auRepo.UpdateAuthor(updateAuthor); var updatedAuthor = _auRepo.GetAuthor(authorId); Assert.Equal(updatedAuthor.LastName, updateAuthor.LastName); DeleteAuthorHelper(authorId); }