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.
-
Field Summary
Fields inherited from class tests.BaseTest
logger, MAX_RETRY_COUNT, USER_ADMIN_TOKEN, USER_AUTH_TOKEN
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
Creates a book before running update book tests.void
Should return 400 when a different book ID is given in the body.void
Should return 401 when no auth is provided on update book.void
Should return 404 when book with ID does not exist.void
Should update the author of a book.void
Should update the title of a book.void
Should update the book when the same book ID is given in the body.Methods inherited from class tests.BaseTest
beforeTest, resetBooksAfterSuite, retryRequest, setup, setUpSuite, teardown
-
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.
-