Compare commits
9 Commits
SalomeeVai
...
9f0f1ae00e
Author | SHA1 | Date | |
---|---|---|---|
9f0f1ae00e | |||
6e8f63e2c0 | |||
|
22bce1d53b | ||
6ec5d152eb | |||
|
f1571ced27 | ||
ca3338fe1a | |||
|
0eac6c497d | ||
|
980fc1cc7c | ||
bec1ca9f04 |
4
.gitignore
vendored
4
.gitignore
vendored
@@ -1 +1,5 @@
|
||||
/target/
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
*.xml
|
||||
>>>>>>> 6e8f63e2c0b4f89a6f46070511e8ce4223af4bb7
|
||||
|
@@ -12,6 +12,7 @@ public class LivreValide {
|
||||
// 1. ISBN : exactement 13 chiffres
|
||||
public static boolean isValidIsbn(String isbn) {
|
||||
// TODO Emile: implémenter la validation
|
||||
|
||||
boolean valide = true;
|
||||
if(isbn.length() == 13){
|
||||
int i = 0;
|
||||
@@ -26,6 +27,7 @@ public class LivreValide {
|
||||
valide = false;
|
||||
}
|
||||
return valide;
|
||||
|
||||
}
|
||||
|
||||
// 2. Titre : pas de balises HTML/JS (<script>, <img>, etc.)
|
||||
@@ -42,13 +44,13 @@ public class LivreValide {
|
||||
|
||||
// 4. Titre : longueur maximale 200 caractères
|
||||
public static boolean isLongueurTitreValid(String titre) {
|
||||
// TODO: implémenter la validation
|
||||
// TODO Morgann: implémenter la validation
|
||||
return false;
|
||||
}
|
||||
|
||||
// 5. Titre : non null et au moins 2 caractères
|
||||
public static boolean isContenuTitreValide(String titre) {
|
||||
// TODO: implémenter la validation
|
||||
// TODO Steve: implémenter la validation
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
@@ -30,7 +30,7 @@ public class GestionBibliotheque {
|
||||
System.out.println("2. Ajouter un livre");
|
||||
System.out.println("3. Afficher les livres");
|
||||
System.out.println("4. Quitter");
|
||||
System.out.println("Votre choix : ");
|
||||
System.out.print("Merci de faire votre choix : ");
|
||||
choix = sc.nextInt();
|
||||
switch (choix) {
|
||||
case 1 :
|
||||
|
@@ -24,6 +24,7 @@ public class LivreValideTest {
|
||||
|
||||
/**
|
||||
* Test of isValidIsbn method, of class LivreValide.
|
||||
* @author Emile
|
||||
*/
|
||||
@Test
|
||||
public void testIsValidIsbn() {
|
||||
@@ -74,6 +75,7 @@ public class LivreValideTest {
|
||||
|
||||
/**
|
||||
* Test of isValidTitre method, of class LivreValide.
|
||||
* @author Salomé/Emile
|
||||
*/
|
||||
@Test
|
||||
public void testIsValidTitre() {
|
||||
@@ -88,6 +90,7 @@ public class LivreValideTest {
|
||||
|
||||
/**
|
||||
* Test of isValidAuteur method, of class LivreValide.
|
||||
* @author Medhi/Steve
|
||||
*/
|
||||
@Test
|
||||
public void testIsValidAuteur() {
|
||||
@@ -102,6 +105,7 @@ public class LivreValideTest {
|
||||
|
||||
/**
|
||||
* Test of isLongueurTitreValid method, of class LivreValide.
|
||||
* @author Morgann
|
||||
*/
|
||||
@Test
|
||||
public void testIsLongueurTitreValid() {
|
||||
@@ -114,4 +118,19 @@ public class LivreValideTest {
|
||||
fail("The test case is a prototype.");
|
||||
}
|
||||
|
||||
/**
|
||||
* Test of isTitreValid method, of class LivreValide.
|
||||
* @author Steve
|
||||
*/
|
||||
@Test
|
||||
public void testIsContenuTitreValide() {
|
||||
System.out.println("isTitreValid");
|
||||
String titre = "";
|
||||
boolean expResult = false;
|
||||
boolean result = LivreValide.isContenuTitreValide(titre);
|
||||
assertEquals(expResult, result);
|
||||
// TODO review the generated test code and remove the default call to fail.
|
||||
fail("The test case is a prototype.");
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user