@Then("the library contains a no book with an <attribute> of <value>") public void thenTheDatabaseContainsANoEntryForBookisbn( @Named("attribute") String attribute, @Named("value") String value) throws SQLException { waitForServerResponse(); database.shouldReturnNothing( "SELECT * FROM book WHERE " + getColumnForAttribute(attribute) + " = '" + value + "'"); }
@Then("books <isbns> are not borrowed anymore by user <user>") public void shouldNotBorrowBooks(@Named("isbns") String isbns, @Named("user") String user) throws SQLException { waitForServerResponse(); database.shouldReturnNothing( "SELECT * FROM borrowing WHERE borrower_email_address='" + user + "'"); }
@Then("the book <isbn> is not available for borrowing anymore") public void shouldNotBeAvailableForBorrowing(@Named("isbn") String isbn) throws SQLException { waitForServerResponse(); database.shouldReturnNothing( "SELECT * FROM book WHERE isbn = '" + isbn + "' AND current_borrowing_id is null"); }