Package tests

Class TS03_UpdateBook

java.lang.Object
tests.BaseTest
tests.TS03_UpdateBook

@Epic("Book Management") @Feature("Update Book") @Severity(NORMAL) public class TS03_UpdateBook extends BaseTest
Test cases for updating books via the API.
  • Constructor Details

    • TS03_UpdateBook

      public TS03_UpdateBook()
  • Method Details

    • createBookBeforeUpdateBookTest

      @BeforeTest(alwaysRun=true) public void createBookBeforeUpdateBookTest()
      Creates a book before running update book tests.
    • testShouldUpdateBookAuthor

      public void testShouldUpdateBookAuthor()
      Should update the author of a book.
    • testShouldUpdateBookTitle

      public void testShouldUpdateBookTitle()
      Should update the title of a book.
    • testShouldReturn401WhenNoAuthIsProvidedOnUpdateBook

      public void testShouldReturn401WhenNoAuthIsProvidedOnUpdateBook()
      Should return 401 when no auth is provided on update book.
    • testShouldReturn404WhenBookWithIdIsNotExists

      public void testShouldReturn404WhenBookWithIdIsNotExists()
      Should return 404 when book with ID does not exist.
    • testShouldReturn400WhenDifferentBookIdIsGivenInBody

      public void testShouldReturn400WhenDifferentBookIdIsGivenInBody()
      Should return 400 when a different book ID is given in the body.
    • testShouldUpdateBookWhenSameBookIdIsGivenInBody

      public void testShouldUpdateBookWhenSameBookIdIsGivenInBody()
      Should update the book when the same book ID is given in the body.