Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,9 @@ public void clearListBook(){
fullBookList.clear();
}
/**
* check if method getAllBook() returns a correct list of all books' found
* getAllBook() return a list of book which is an indirect output
* Create a mock book object to test its method.
* Check if the method getAllBooks() return all books
*/
@Test
public void returnAllRetrievedBook(){
Expand All @@ -72,7 +74,9 @@ public void returnAllRetrievedBook(){
}

/**
* very if method getAllBook() was called
* Create a mock book object to test its method.
* getAllBook() return a list of book which is an indirect output
* verify if method getAllBook() was called
*/
@Test
public void verifyAllRetrievedBookMethodIsCalled(){
Expand All @@ -85,6 +89,8 @@ public void verifyAllRetrievedBookMethodIsCalled(){
}

/**
* Create a mock book object to test its method.
* getAllBookTitles() return a list of book titles which is an indirect output
* check if method getAllBookTitles() returns a correct list of all books' titles found
*/
@Test
Expand All @@ -98,7 +104,9 @@ public void returnAllRetrievedBookTitles(){
}

/**
* check if method getAllBookTitles() returns a correct list of all books' titles found
* Create a mock book object to test its method.
* getAllBookTitles() return a list of book titles which is an indirect output
* verify if method getAllBookTitles() was called
*/
@Test
public void verifyAllRetrievedBookTitles(){
Expand All @@ -111,7 +119,9 @@ public void verifyAllRetrievedBookTitles(){
}

/**
* check if method getBookWithName() returns a matched book's name with all details
* Create a mock book object
* Pass direct input a and b to methods bookTitleList.get() and book.getABookWithTitle() respectively to get direct outputs *
* Check if method getBookWithName() returns a matched book's name with all details 3 times with 3 different direct inputs
*/
@ParameterizedTest(name = "{index} => a={0}, b={1}")
@CsvSource({
Expand All @@ -128,7 +138,9 @@ public void returnABookWithMatchedName(String a, int b){
}

/**
* check if method getBookWithName() returns a matched book's id with all details
* Create a mock book object
* Pass direct input a and b to methods bookTitleList.get() and book.getABookWithMatchedId() respectively to get direct outputs *
* Check if method getABookWithMatchedId() returns a matched book's name with all details 3 times with 3 different direct inputs
*/
@ParameterizedTest(name = "{index} => a={0}, b={1}")
@CsvSource({
Expand All @@ -145,7 +157,9 @@ public void returnABookWithMatchedId(String a, int b){
}

/**
* check if method getBookWithName() returns a matched book's year with all details
* Create a mock book object
* Pass direct input a and b to methods bookTitleList.get() and book.getABookWithMatchedYear() respectively to get direct outputs *
* Check if method getABookWithMatchedYear() returns a matched book's name with all details 3 times with 3 different direct inputs
*/
@ParameterizedTest(name = "{index} => a={0}")
@CsvSource({
Expand Down