Ejemplo n.º 1
0
        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);
        }
Ejemplo n.º 2
0
        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);
        }