Package tests

Class TS02_GetBook

java.lang.Object
tests.BaseTest
tests.TS02_GetBook

@Epic("Book Management") @Feature("Retrieve Book") @Severity(CRITICAL) public class TS02_GetBook extends BaseTest
Test cases for retrieving books via the API.
  • Constructor Details

    • TS02_GetBook

      public TS02_GetBook()
  • Method Details

    • createBooksBeforeGetBookTest

      @BeforeTest(alwaysRun=true) public void createBooksBeforeGetBookTest()
      Creates books before running get book tests.
    • testShouldReturnBooksForDefaultPage1

      public void testShouldReturnBooksForDefaultPage1()
      Should return books for default page 1.
    • testShouldReturnBooksByPageNumber

      public void testShouldReturnBooksByPageNumber()
      Should return books by page number.
    • testShouldReturnBooksByLimit

      public void testShouldReturnBooksByLimit()
      Should return books by limit.
    • testShouldReturnBooksByLimitAndPage

      public void testShouldReturnBooksByLimitAndPage()
      Should return books by limit and page.
    • testShouldReturnNoBooksIfPageNumberIsNotInRange

      public void testShouldReturnNoBooksIfPageNumberIsNotInRange()
      Should return no books if page number is not in range.
    • testShouldReturnNoBooksOnNegativePage

      public void testShouldReturnNoBooksOnNegativePage()
      Should return no books on negative page.
    • testShouldReturnBooksExcludingLastLimitOnNegativeLimit

      public void testShouldReturnBooksExcludingLastLimitOnNegativeLimit()
      Should return books excluding last limit on negative limit.
    • testShouldReturnSingleBookByID

      public void testShouldReturnSingleBookByID()
      Should return a single book by ID.
    • testShouldNotReturnBookWhenBookIdIsInvalidString

      public void testShouldNotReturnBookWhenBookIdIsInvalidString(Object inValidBookId)
      Should not return a book when book ID is an invalid string.
    • getInvalidBookID

      @DataProvider(name="InvalidBookID") public Object[] getInvalidBookID()
    • testShouldNotReturnBookWhenBookIdNotExists

      public void testShouldNotReturnBookWhenBookIdNotExists()
      Should not return a book when book ID does not exist.
    • testShouldReturnAllBooksWhenBookIdIsEmpty

      public void testShouldReturnAllBooksWhenBookIdIsEmpty()
      Should return all books when book ID is empty.
    • testShouldReturnBooksContainsAuthor

      public void testShouldReturnBooksContainsAuthor()
      Should return books containing the author.
    • testShouldReturnBooksContainsTitle

      public void testShouldReturnBooksContainsTitle()
      Should return books containing the title.
    • testShouldReturnBooksContainsTitleAndAuthor

      public void testShouldReturnBooksContainsTitleAndAuthor()
      Should return books containing both title and author.
    • testShouldReturnSingleBookWithTitleAndAuthor

      public void testShouldReturnSingleBookWithTitleAndAuthor()
      Should return a single book with title and author.
    • testShouldReturn404WhenBookSearchWithoutAuthorAndTitle

      public void testShouldReturn404WhenBookSearchWithoutAuthorAndTitle()
      Should return 404 when book search is without author and title.
    • testShouldReturnNoBooksWhenBookWithTitleAndAuthorNotExists

      public void testShouldReturnNoBooksWhenBookWithTitleAndAuthorNotExists()
      Should return no books when book with title and author does not exist.
    • testShouldReturnNoBooksWhenBookWithAuthorNotExists

      public void testShouldReturnNoBooksWhenBookWithAuthorNotExists()
      Should return no books when book with author does not exist.
    • testShouldReturnNoBooksWhenBookWithTitleNotExists

      public void testShouldReturnNoBooksWhenBookWithTitleNotExists()
      Should return no books when book with title does not exist.