Correction

This commit is contained in:
2025-06-13 19:34:46 +02:00
parent 81ae9faba6
commit 3b42e4aaf9
2 changed files with 2 additions and 2 deletions

View File

@@ -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);

View File

@@ -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);