From 24c54bc05ba90b41e7e5fa108531ad5fe0b20d5b Mon Sep 17 00:00:00 2001 From: "delphine.thevenot" Date: Wed, 24 Sep 2025 17:21:14 +0200 Subject: [PATCH] =?UTF-8?q?m=C3=A0j=20pour=20version=20initialeV2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pom.xml | 8 ++++--- .../bibliotheque/Métier/LivreTest.java | 23 ++++++++----------- 2 files changed, 14 insertions(+), 17 deletions(-) diff --git a/pom.xml b/pom.xml index 97fb890..9e34b17 100644 --- a/pom.xml +++ b/pom.xml @@ -6,7 +6,7 @@ 4.0.0 com.mycompany - bibliotheque + GestionBibliotheque 1.0-SNAPSHOT jar @@ -19,6 +19,7 @@ 4.13.2 test + @@ -28,9 +29,10 @@ org.apache.maven.plugins maven-surefire-plugin - 3.1.2 + 2.22.2 + - + GestionBibliotheque diff --git a/src/test/java/com/mycompany/bibliotheque/Métier/LivreTest.java b/src/test/java/com/mycompany/bibliotheque/Métier/LivreTest.java index a15f0a7..07d1fb1 100644 --- a/src/test/java/com/mycompany/bibliotheque/Métier/LivreTest.java +++ b/src/test/java/com/mycompany/bibliotheque/Métier/LivreTest.java @@ -13,19 +13,14 @@ import static org.junit.Assert.*; * @author dthev */ public class LivreTest { - public LivreTest() { - } - - @Before - public void setUp() { - } - @Test - public void testCreationLivre() { - Livre b = new Livre("1984", "George Orwell", "1234567890123",false); - assertEquals("1984", b.getTitre()); - assertEquals("George Orwell", b.getAuteur()); - assertEquals("1234567890123", b.getIsbn()); - } - +public void testCreationLivre() { + Livre b = new Livre("1984", "George Orwell", "1234567890123", false); + + assertNotNull(b); + assertEquals("1984", b.getTitre()); + assertEquals("George Orwell", b.getAuteur()); // corrigé + assertEquals("1234567890123", b.getIsbn()); + assertFalse(b.isEmprunte()); // si la méthode existe +} }