forked from pierront/mylibrary-template
Correction
This commit is contained in:
@@ -23,8 +23,9 @@ public final class BookRepository {
|
||||
|
||||
public Book save(Book newBook) {
|
||||
for (Book book: books) {
|
||||
if (book.getIsbn() == newBook.getIsbn()){
|
||||
if (book.getIsbn().equals(newBook.getIsbn())){
|
||||
books.remove(book);
|
||||
break;
|
||||
}
|
||||
}
|
||||
this.books.add(newBook);
|
||||
|
@@ -225,7 +225,6 @@ public class OrderSteps {
|
||||
assertTrue(isOrderOrBookNotFound,
|
||||
"The exception should be of type OrderNotFoundException or BookNotFoundException. Exception réelle : " + exception.getClass().getName());
|
||||
String actualMessage = exception.getMessage();
|
||||
System.out.println("[DEBUG] Exception message: '" + actualMessage + "'");
|
||||
boolean match = false;
|
||||
if (actualMessage != null) {
|
||||
match = actualMessage.contains(errorMessage);
|
||||
|
Reference in New Issue
Block a user