màj pour version initialeV2

This commit is contained in:
2025-09-24 17:21:14 +02:00
parent 8ad886834d
commit 24c54bc05b
2 changed files with 14 additions and 17 deletions

View File

@@ -6,7 +6,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>com.mycompany</groupId>
<artifactId>bibliotheque</artifactId>
<artifactId>GestionBibliotheque</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>jar</packaging>
@@ -19,6 +19,7 @@
<version>4.13.2</version>
<scope>test</scope>
</dependency>
</dependencies>
<!-- Configuration du build -->
@@ -28,9 +29,10 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.1.2</version>
<version>2.22.2</version>
</plugin>
</plugins>
</build>
<name>GestionBibliotheque</name>
</project>

View File

@@ -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());
}
assertNotNull(b);
assertEquals("1984", b.getTitre());
assertEquals("George Orwell", b.getAuteur()); // corrigé
assertEquals("1234567890123", b.getIsbn());
assertFalse(b.isEmprunte()); // si la méthode existe
}
}