Package tests
Class TS01_CreateBook
java.lang.Object
tests.BaseTest
tests.TS01_CreateBook
@Epic("Book Management")
@Feature("Create Book")
@Severity(CRITICAL)
public class TS01_CreateBook
extends BaseTest
Test cases for creating 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
Should create a book when author is different for the same book.void
Should create a book when title and author are valid.void
Should create a book when title is different for the same author.void
Should create a book using JsonStringify when title and author are valid.void
Should reject book creation when client provides an ID.void
Should reject book creation when author is missing.void
Should reject book creation when title is missing.void
Should reject book creation with missing title and author.void
Should reject duplicate book creation.void
Should return 401 when no auth token is provided.Methods inherited from class tests.BaseTest
beforeTest, resetBooksAfterSuite, retryRequest, setup, setUpSuite, teardown
-
Constructor Details
-
TS01_CreateBook
public TS01_CreateBook()
-
-
Method Details
-
testShouldCreateBookWhenTitleAndAuthorAreValid
public void testShouldCreateBookWhenTitleAndAuthorAreValid()Should create a book when title and author are valid. -
testShouldRejectDuplicateBookCreation
public void testShouldRejectDuplicateBookCreation()Should reject duplicate book creation. -
testShouldCreateBookWithJsonStringifyWhenTitleAndAuthorAreValid
public void testShouldCreateBookWithJsonStringifyWhenTitleAndAuthorAreValid()Should create a book using JsonStringify when title and author are valid. -
testShouldCreateBookWhenTitleIsDifferentForSameAuthor
public void testShouldCreateBookWhenTitleIsDifferentForSameAuthor()Should create a book when title is different for the same author. -
testShouldCreateBookWhenAuthorIsDifferentForSameBook
public void testShouldCreateBookWhenAuthorIsDifferentForSameBook()Should create a book when author is different for the same book. -
testShouldReturn401WhenNoAuthTokenProvided
public void testShouldReturn401WhenNoAuthTokenProvided()Should return 401 when no auth token is provided. -
testShouldRejectBookWithMissingTitleAndAuthor
public void testShouldRejectBookWithMissingTitleAndAuthor()Should reject book creation with missing title and author. -
testShouldRejectBookWhenTitleIsMissing
public void testShouldRejectBookWhenTitleIsMissing()Should reject book creation when title is missing. -
testShouldRejectBookWhenAuthorIsMissing
public void testShouldRejectBookWhenAuthorIsMissing()Should reject book creation when author is missing. -
testShouldRejectBookCreationWithClientProvidedId
public void testShouldRejectBookCreationWithClientProvidedId()Should reject book creation when client provides an ID.
-