Compare commits
32 Commits
c62034dc11
...
medhiFunc
Author | SHA1 | Date | |
---|---|---|---|
|
2c79daa4b9 | ||
|
877fecb923 | ||
bb891a52a8 | |||
6e303b8977 | |||
ed13a79a2f | |||
ed163b1a9a | |||
c1aa2e4775 | |||
894688c5f0 | |||
7970ca8df6 | |||
d0db3d84a3 | |||
6e988ca75a | |||
906f075a95 | |||
09cf3836c2 | |||
c762aac862 | |||
a606a72476 | |||
9f0f1ae00e | |||
1f44c6ee69 | |||
3f63db1a92 | |||
19d2e618c3 | |||
|
9593ca5fab | ||
6e8f63e2c0 | |||
|
a7b45071cc | ||
|
22bce1d53b | ||
6ec5d152eb | |||
|
f1571ced27 | ||
ca3338fe1a | |||
|
0eac6c497d | ||
|
980fc1cc7c | ||
bec1ca9f04 | |||
fd2f9066b7 | |||
d92fa2649e | |||
62092bb78b |
5
.gitignore
vendored
Normal file
5
.gitignore
vendored
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
/target/
|
||||||
|
<<<<<<< HEAD
|
||||||
|
=======
|
||||||
|
*.xml
|
||||||
|
>>>>>>> 6e8f63e2c0b4f89a6f46070511e8ce4223af4bb7
|
4
aLire.txt
Normal file
4
aLire.txt
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
dépôt gitea : https://gitea.lyc-lecastel.fr/delphine.thevenot/2026TestsBibliotheque.git
|
||||||
|
branche : developpement
|
||||||
|
|
||||||
|
multibranches, fusions difficiles, à revoir
|
@@ -1,33 +0,0 @@
|
|||||||
/*
|
|
||||||
* Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
|
|
||||||
*/
|
|
||||||
|
|
||||||
package com.mycompany.bibliotheque;
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @author dthev
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
import java.util.Scanner;
|
|
||||||
|
|
||||||
public class Bibliotheque {
|
|
||||||
public static void main(String[] args) {
|
|
||||||
Scanner sc = new Scanner(System.in);
|
|
||||||
Livre l1 = new Livre("1984", 10.0);
|
|
||||||
Utilisateur u1 = new Utilisateur("Alice");
|
|
||||||
|
|
||||||
System.out.println("Bienvenue dans la bibliothèque !");
|
|
||||||
System.out.println("1. Afficher un livre");
|
|
||||||
System.out.println("2. Emprunter un livre");
|
|
||||||
System.out.println("Votre choix : ");
|
|
||||||
int choix = sc.nextInt();
|
|
||||||
if (choix == 1) {
|
|
||||||
System.out.println("Livre : " + l1.getTitre());
|
|
||||||
} else if (choix == 2) {
|
|
||||||
boolean ok = Emprunt.effectuerEmprunt(u1, l1);
|
|
||||||
System.out.println(ok ? "Emprunt réussi !" : "Échec de l'emprunt.");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@@ -0,0 +1,121 @@
|
|||||||
|
/*
|
||||||
|
* Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
|
||||||
|
* Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template
|
||||||
|
*/
|
||||||
|
package com.mycompany.bibliotheque.Controle;
|
||||||
|
|
||||||
|
import com.mycompany.bibliotheque.Metier.Livre;
|
||||||
|
import com.mycompany.bibliotheque.Metier.Utilisateur;
|
||||||
|
import java.util.Scanner;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Classe de contrôle de la classe Livre
|
||||||
|
* @author dthev
|
||||||
|
*/
|
||||||
|
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;
|
||||||
|
while (i < 13 && valide) {
|
||||||
|
if(!Character.isDigit(isbn.charAt(i))){
|
||||||
|
valide = false;
|
||||||
|
}else{
|
||||||
|
i++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
valide = false;
|
||||||
|
}
|
||||||
|
return valide;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
// 2. Titre : pas de balises HTML/JS (<script>, <img>, etc.)
|
||||||
|
public static boolean isValidTitre(String Titre) {
|
||||||
|
// TODO Salomon: implémenter la validation
|
||||||
|
boolean test = true;
|
||||||
|
int i = 0;
|
||||||
|
while (i < Titre.length() && test) {
|
||||||
|
if(Titre.charAt(i) == '<' || Titre.charAt(i) == '>'){
|
||||||
|
test = false;
|
||||||
|
}else{
|
||||||
|
i++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return test;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 3. Auteur : non vide et pas de chiffres ou caractères spéciaux
|
||||||
|
public static boolean isValidAuteur(String auteur) {
|
||||||
|
|
||||||
|
//verification que auteur n'est pas vide ou null
|
||||||
|
if (auteur == null || auteur.isBlank()) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
//ajout d'un pattern pour avoir uniquement des minuscules/majuscules
|
||||||
|
String pattern = "^[a-zA-Z -]+$";
|
||||||
|
//verification boolean que le nom d'auteur corresponde au patterne
|
||||||
|
return auteur.matches(pattern);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 4. Titre : longueur maximale 200 caractères
|
||||||
|
public static boolean isLongueurTitreValid(String titre) {
|
||||||
|
// TODO Morgann: implémenter la validation
|
||||||
|
boolean valide = false;
|
||||||
|
if(titre.length()<=200 && titre != "" && titre != null){
|
||||||
|
valide = true;
|
||||||
|
}
|
||||||
|
return valide;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 5. Titre : non null et au moins 2 caractères
|
||||||
|
public static boolean isContenuTitreValide(String titre) {
|
||||||
|
// TODO Steve: implémenter la validation
|
||||||
|
if (titre == null) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
boolean contenuValide = titre.matches(".*[a-zA-Z].*[a-zA-Z].*");
|
||||||
|
|
||||||
|
return contenuValide;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* IsDisponible()
|
||||||
|
* Vérifier livre pas déjà emprunté
|
||||||
|
* @author Emile
|
||||||
|
*/
|
||||||
|
public static boolean isDisponible (Livre leLivre){
|
||||||
|
boolean valide = true;
|
||||||
|
if(leLivre.isEmprunte()){
|
||||||
|
valide = false;
|
||||||
|
}
|
||||||
|
return valide;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* IsDisponible()
|
||||||
|
* Vérifier livre pas déjà emprunté
|
||||||
|
* @author Morgann/Emile
|
||||||
|
*/
|
||||||
|
public static boolean retourLivre(Utilisateur user){
|
||||||
|
Scanner sc = new Scanner(System.in);
|
||||||
|
int i=0;
|
||||||
|
for(Livre unLivre:user.getEmprunts()){
|
||||||
|
i++;
|
||||||
|
System.out.println(i+". "+unLivre.getTitre());
|
||||||
|
}
|
||||||
|
System.out.print("Merci de faire votre choix : ");
|
||||||
|
int choix = sc.nextInt();
|
||||||
|
Livre leLivre = user.getEmprunts().get(choix-1);
|
||||||
|
|
||||||
|
leLivre.setEmprunte(false);
|
||||||
|
user.getEmprunts().remove(leLivre);
|
||||||
|
return leLivre.isEmprunte();
|
||||||
|
}
|
||||||
|
}
|
@@ -0,0 +1,78 @@
|
|||||||
|
/*
|
||||||
|
* Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
|
||||||
|
*/
|
||||||
|
|
||||||
|
package com.mycompany.bibliotheque;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Classe principale
|
||||||
|
* @author dthev
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
import com.mycompany.bibliotheque.Metier.Bibliotheque;
|
||||||
|
import com.mycompany.bibliotheque.Metier.Emprunt;
|
||||||
|
import com.mycompany.bibliotheque.Metier.Utilisateur;
|
||||||
|
import com.mycompany.bibliotheque.Metier.Livre;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.Scanner;
|
||||||
|
|
||||||
|
public class GestionBibliotheque {
|
||||||
|
public static void main(String[] args) {
|
||||||
|
Scanner sc = new Scanner(System.in);
|
||||||
|
int choix=0;
|
||||||
|
Bibliotheque laBibli = new Bibliotheque();
|
||||||
|
ArrayList<Livre> mesLivres = new ArrayList<>();
|
||||||
|
Utilisateur unUtilisateur = new Utilisateur("Emile", mesLivres);
|
||||||
|
Livre ll = new Livre(1,"Le secret des secrets","Dan Brown","9782709668385",true);
|
||||||
|
Livre l2 = new Livre(2,"Le secret des secrets","Dan Brown","9772709668385",true);
|
||||||
|
Livre l3 = new Livre(3,"Le secret des secrets","Dan Brown","9712709668385",true);
|
||||||
|
Livre l4 = new Livre(4,"Le secret des secrets","Dan Brown","9792709668385",true);
|
||||||
|
Livre l5 = new Livre(5,"Le secret des secrets","Dan Brown","9282709668385",false);
|
||||||
|
//Utilisateur u1 = new Utilisateur("Alice", mesLivres.add(l1));
|
||||||
|
|
||||||
|
System.out.println("Bienvenue dans la bibliothèque !");
|
||||||
|
while (choix!=4){
|
||||||
|
System.out.println("1. Afficher un livre");
|
||||||
|
System.out.println("2. Ajouter un livre");
|
||||||
|
System.out.println("3. Afficher les livres");
|
||||||
|
System.out.println("4. Quitter");
|
||||||
|
System.out.print("Merci de faire votre choix : ");
|
||||||
|
choix = sc.nextInt();
|
||||||
|
switch (choix) {
|
||||||
|
case 1 :
|
||||||
|
System.out.println("---Livre : " + ll.getTitre());
|
||||||
|
break;
|
||||||
|
case 2 :
|
||||||
|
laBibli.addLivre(ll);
|
||||||
|
laBibli.addLivre(l2);
|
||||||
|
laBibli.addLivre(l3);
|
||||||
|
laBibli.addLivre(l4);
|
||||||
|
laBibli.addLivre(l5);
|
||||||
|
|
||||||
|
break;
|
||||||
|
case 3 :
|
||||||
|
for (Livre leLivre : laBibli.getLesLivres()) {
|
||||||
|
if (leLivre.isEmprunte() == true) {
|
||||||
|
System.out.println("---"+ leLivre.getNumero() + " " + leLivre.toString());
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
System.out.println("Choisir un livre avec le numéro du livre souhaité");
|
||||||
|
System.out.print("Merci de faire votre choix : ");
|
||||||
|
int choixLivre = sc.nextInt();
|
||||||
|
|
||||||
|
Livre livreChoisi = laBibli.trouverLivreParNumero(choixLivre);
|
||||||
|
if (unUtilisateur.emprunterLivre(livreChoisi) == true) {
|
||||||
|
System.out.print("Validation de l'emprunt");
|
||||||
|
} else {
|
||||||
|
System.out.print("Erreur lors de l'emprunt");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@@ -1,45 +0,0 @@
|
|||||||
/*
|
|
||||||
* Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
|
|
||||||
* Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template
|
|
||||||
*/
|
|
||||||
package com.mycompany.bibliotheque;
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @author dthev
|
|
||||||
*/
|
|
||||||
|
|
||||||
public class Livre {
|
|
||||||
private String titre;
|
|
||||||
private double prixHT;
|
|
||||||
private boolean emprunte;
|
|
||||||
|
|
||||||
public Livre(String titre, double prixHT) {
|
|
||||||
this.titre = titre;
|
|
||||||
this.prixHT = prixHT;
|
|
||||||
this.emprunte = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getTitre() {
|
|
||||||
return titre;
|
|
||||||
}
|
|
||||||
|
|
||||||
public double getPrixHT() {
|
|
||||||
return prixHT;
|
|
||||||
}
|
|
||||||
|
|
||||||
public boolean isEmprunte() {
|
|
||||||
return emprunte;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setEmprunte(boolean emprunte) {
|
|
||||||
this.emprunte = emprunte;
|
|
||||||
}
|
|
||||||
|
|
||||||
// TODO: calculer le prix TTC avec une TVA de 5.5%
|
|
||||||
public double getPrixTTC() {
|
|
||||||
return 0.0; // à compléter
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
@@ -0,0 +1,58 @@
|
|||||||
|
/*
|
||||||
|
* Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
|
||||||
|
* Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template
|
||||||
|
*/
|
||||||
|
package com.mycompany.bibliotheque.Metier;
|
||||||
|
|
||||||
|
import com.mycompany.bibliotheque.Controle.LivreValide;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Classe métier
|
||||||
|
* @author dthev
|
||||||
|
*/
|
||||||
|
public class Bibliotheque {
|
||||||
|
private List<Livre> lesLivres = new ArrayList<>();
|
||||||
|
|
||||||
|
// 5. ISBN doit être unique
|
||||||
|
public boolean addLivre(Livre b) {
|
||||||
|
//ajoute b si valide et si n'existe pas - à écrire
|
||||||
|
String issues = "";
|
||||||
|
if (!LivreValide.isValidIsbn(b.getIsbn())) issues += "1 ";
|
||||||
|
if (!LivreValide.isValidTitre(b.getTitre())) issues += "2 ";
|
||||||
|
if (!LivreValide.isValidAuteur(b.getAuteur())) issues += "3 ";
|
||||||
|
if (!LivreValide.isLongueurTitreValid(b.getTitre())) issues += "4 ";
|
||||||
|
if (!LivreValide.isContenuTitreValide(b.getTitre())) issues += "5";
|
||||||
|
|
||||||
|
System.out.println(issues);
|
||||||
|
|
||||||
|
if (issues.length() < 1) {
|
||||||
|
System.out.println("valide");
|
||||||
|
for (Livre livre : this.getLesLivres()) {
|
||||||
|
if (livre.getIsbn().equals(b.getIsbn())) return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
lesLivres.add(b);
|
||||||
|
|
||||||
|
return true;
|
||||||
|
} else return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<Livre> getLesLivres() {
|
||||||
|
return lesLivres;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setLesLivres(List<Livre> lesLivres) {
|
||||||
|
this.lesLivres = lesLivres;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Livre trouverLivreParNumero(int numero) {
|
||||||
|
for (Livre l : lesLivres) {
|
||||||
|
if (l.getNumero() == numero) {
|
||||||
|
return l;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return null; // pas trouvé
|
||||||
|
}
|
||||||
|
}
|
@@ -2,7 +2,10 @@
|
|||||||
* Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
|
* Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
|
||||||
* Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template
|
* Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template
|
||||||
*/
|
*/
|
||||||
package com.mycompany.bibliotheque;
|
package com.mycompany.bibliotheque.Metier;
|
||||||
|
|
||||||
|
import com.mycompany.bibliotheque.Metier.Utilisateur;
|
||||||
|
import com.mycompany.bibliotheque.Metier.Livre;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
79
src/main/java/com/mycompany/bibliotheque/Metier/Livre.java
Normal file
79
src/main/java/com/mycompany/bibliotheque/Metier/Livre.java
Normal file
@@ -0,0 +1,79 @@
|
|||||||
|
/*
|
||||||
|
* Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
|
||||||
|
* Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template
|
||||||
|
*/
|
||||||
|
package com.mycompany.bibliotheque.Metier;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author dthev
|
||||||
|
*/
|
||||||
|
|
||||||
|
public class Livre {
|
||||||
|
private int numero;
|
||||||
|
private String titre;
|
||||||
|
private String auteur;
|
||||||
|
private String isbn; // ISBN sous forme de chaîne
|
||||||
|
private Boolean emprunte;
|
||||||
|
|
||||||
|
public Livre(String titre, String auteur, String isbn, Boolean emprunte) {
|
||||||
|
this.titre = titre;
|
||||||
|
this.auteur = auteur;
|
||||||
|
this.isbn = isbn;
|
||||||
|
this.emprunte = emprunte;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Livre(int numero, String titre, String auteur, String isbn, Boolean emprunte) {
|
||||||
|
this.numero = numero;
|
||||||
|
this.titre = titre;
|
||||||
|
this.auteur = auteur;
|
||||||
|
this.isbn = isbn;
|
||||||
|
this.emprunte = emprunte;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getNumero() {
|
||||||
|
return numero;
|
||||||
|
}
|
||||||
|
|
||||||
|
//getters et setters
|
||||||
|
public String getTitre() {
|
||||||
|
return titre;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTitre(String titre) {
|
||||||
|
this.titre = titre;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getAuteur() {
|
||||||
|
return auteur;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setAuteur(String auteur) {
|
||||||
|
this.auteur = auteur;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getIsbn() {
|
||||||
|
return isbn;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setIsbn(String isbn) {
|
||||||
|
this.isbn = isbn;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isEmprunte() {
|
||||||
|
return emprunte;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setEmprunte(boolean emprunte) {
|
||||||
|
this.emprunte = emprunte;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return "Livre{" + "titre=" + titre + ", auteur=" + auteur + ", isbn=" + isbn + ", emprunte=" + emprunte + '}';
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
@@ -2,7 +2,7 @@
|
|||||||
* Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
|
* Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
|
||||||
* Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template
|
* Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template
|
||||||
*/
|
*/
|
||||||
package com.mycompany.bibliotheque;
|
package com.mycompany.bibliotheque.Metier;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
@@ -13,10 +13,10 @@ import java.util.ArrayList;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
public class Utilisateur {
|
public class Utilisateur {
|
||||||
private String nom;
|
private final String nom;
|
||||||
private List<Livre> emprunts;
|
private final ArrayList<Livre> emprunts;
|
||||||
|
|
||||||
public Utilisateur(String nom) {
|
public Utilisateur(String nom, ArrayList<Livre> mesLivres) {
|
||||||
this.nom = nom;
|
this.nom = nom;
|
||||||
this.emprunts = new ArrayList<>();
|
this.emprunts = new ArrayList<>();
|
||||||
}
|
}
|
||||||
@@ -29,8 +29,19 @@ public class Utilisateur {
|
|||||||
return emprunts;
|
return emprunts;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// TODO: ajouter un emprunt si l'utilisateur a moins de 3 livres
|
// TODO: ajouter un emprunt si l'utilisateur a moins de 3 livres
|
||||||
|
/**
|
||||||
|
* @author Medhi
|
||||||
|
* @param livre
|
||||||
|
*/
|
||||||
public boolean emprunterLivre(Livre livre) {
|
public boolean emprunterLivre(Livre livre) {
|
||||||
return false; // à compléter
|
if (emprunts.size() < 3) {
|
||||||
|
emprunts.add(livre);
|
||||||
|
livre.setEmprunte(false);
|
||||||
|
return true;
|
||||||
|
} else {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
105
src/test/java/com/mycompany/bibliotheque/BibliothequeTest.java
Normal file
105
src/test/java/com/mycompany/bibliotheque/BibliothequeTest.java
Normal file
@@ -0,0 +1,105 @@
|
|||||||
|
/*
|
||||||
|
* Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
|
||||||
|
* Click nbfs://nbhost/SystemFileSystem/Templates/UnitTests/JUnit4TestClass.java to edit this template
|
||||||
|
*/
|
||||||
|
package com.mycompany.bibliotheque;
|
||||||
|
|
||||||
|
import com.mycompany.bibliotheque.Metier.Bibliotheque;
|
||||||
|
import com.mycompany.bibliotheque.Metier.Livre;
|
||||||
|
import java.util.List;
|
||||||
|
import org.junit.Before;
|
||||||
|
import org.junit.Test;
|
||||||
|
import static org.junit.Assert.*;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author dthev
|
||||||
|
*/
|
||||||
|
public class BibliothequeTest {
|
||||||
|
|
||||||
|
public BibliothequeTest() {
|
||||||
|
}
|
||||||
|
|
||||||
|
@Before
|
||||||
|
public void setUp() {
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Test of addLivre method, of class Bibliotheque.
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
public void testAddLivre() {
|
||||||
|
System.out.println("addLivre");
|
||||||
|
Bibliotheque instance = new Bibliotheque();
|
||||||
|
|
||||||
|
// Ajout d'un livre avec ISBN invalide
|
||||||
|
Livre livre = new Livre("Naruto", "Masashi Kishimoto", "1234ABCD567", false);
|
||||||
|
boolean ajoutLivre = instance.addLivre(livre);
|
||||||
|
System.out.println("Refus de l'ISBN invalide");
|
||||||
|
assertFalse("L'ISBN du livre n'est pas censé être valide avec lettres !", ajoutLivre);
|
||||||
|
|
||||||
|
// Ajout d'un livre avec titre invalide
|
||||||
|
livre = new Livre("<script>Dragon Ball</script>", "Akira Toriyama", "8762709652385", false);
|
||||||
|
ajoutLivre = instance.addLivre(livre);
|
||||||
|
System.out.println("Refus de titre invalide");
|
||||||
|
assertFalse("Le titre du livre n'est pas censé être valide avec des balises !", ajoutLivre);
|
||||||
|
|
||||||
|
// Ajout d'un livre avec auteur invalide
|
||||||
|
livre = new Livre("Dr. STONE", "Bo1ch1", "8762207682385", false);
|
||||||
|
ajoutLivre = instance.addLivre(livre);
|
||||||
|
System.out.println("Refus d'auteur invalide");
|
||||||
|
assertFalse("L'auteur du livre n'est pas censé être valide avec des caractères non alphabétiques !", ajoutLivre);
|
||||||
|
|
||||||
|
// Ajout d'un livre avec longueur de titre invalide
|
||||||
|
livre = new Livre("Dandadandadandadandadandadandadandadandadandadandadandadandadandadandadandadandadandadandadandadandadandadandadandadandadandadandadandadandadandadandadandadandadandadandadandadandadandadandadandadandadandadandadandadandadandadandadandadandadandadandadandadandadandadandadandadandadandadandadandadandadandadandadandadandadandadandadandadandadandadandadandadandadandadan", "Yukinobu Tatsu", "1702203672985", false);
|
||||||
|
ajoutLivre = instance.addLivre(livre);
|
||||||
|
System.out.println("Refus de longueur de titre invalide");
|
||||||
|
assertFalse("Le titre n'est pas censé être valide avec une longueur excédant les 200 caractères !", ajoutLivre);
|
||||||
|
|
||||||
|
// Ajout d'un livre avec contenu de titre invalide
|
||||||
|
livre = new Livre("007", "Steve Maingana", "3712503622788", false);
|
||||||
|
ajoutLivre = instance.addLivre(livre);
|
||||||
|
System.out.println("Refus de contenu de titre invalide invalide");
|
||||||
|
assertFalse("Le titre n'est pas censé être valide sans au moins 2 caractères alphabétiques !", ajoutLivre);
|
||||||
|
|
||||||
|
// Premier ajout de livre
|
||||||
|
livre = new Livre("Frieren", "Kanehito Yamada", "6785708652385", false);
|
||||||
|
ajoutLivre = instance.addLivre(livre);
|
||||||
|
System.out.println("Premier ajout d'un même livre");
|
||||||
|
System.out.println(ajoutLivre);
|
||||||
|
assertTrue("La bibliothèque ne permet pas de doublon !", ajoutLivre);
|
||||||
|
|
||||||
|
// Second ajout du même livre
|
||||||
|
ajoutLivre = instance.addLivre(livre);
|
||||||
|
System.out.println("Refus d'ajout du même livre");
|
||||||
|
assertFalse("La bibliothèque ne permet pas de doublon !", ajoutLivre);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Test of getLesLivres method, of class Bibliotheque.
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
public void testGetLesLivres() {
|
||||||
|
System.out.println("getLesLivres");
|
||||||
|
Bibliotheque instance = new Bibliotheque();
|
||||||
|
List<Livre> expResult = null;
|
||||||
|
List<Livre> result = instance.getLesLivres();
|
||||||
|
assertEquals(expResult, result);
|
||||||
|
// TODO review the generated test code and remove the default call to fail.
|
||||||
|
fail("The test case is a prototype.");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Test of setLesLivres method, of class Bibliotheque.
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
public void testSetLesLivres() {
|
||||||
|
System.out.println("setLesLivres");
|
||||||
|
List<Livre> lesLivres = null;
|
||||||
|
Bibliotheque instance = new Bibliotheque();
|
||||||
|
instance.setLesLivres(lesLivres);
|
||||||
|
// TODO review the generated test code and remove the default call to fail.
|
||||||
|
fail("The test case is a prototype.");
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@@ -4,49 +4,20 @@
|
|||||||
*/
|
*/
|
||||||
package com.mycompany.bibliotheque;
|
package com.mycompany.bibliotheque;
|
||||||
|
|
||||||
|
import com.mycompany.bibliotheque.Metier.Livre;
|
||||||
import org.junit.Before;
|
import org.junit.Before;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
import static org.junit.Assert.*;
|
import static org.junit.Assert.*;
|
||||||
|
|
||||||
public class LivreTest {
|
public class LivreTest {
|
||||||
|
|
||||||
private Livre livre;
|
|
||||||
|
|
||||||
@Before
|
|
||||||
public void setUp() {
|
|
||||||
// Création d'un livre avant chaque test
|
|
||||||
livre = new Livre("Java Basics", 20.0);
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testGetTitre() {
|
public void testCreationLivre() {
|
||||||
assertEquals("pb titre","Java Basic", livre.getTitre());
|
Livre b = new Livre("1984", "George Orwell", "1234567890123", false);
|
||||||
}
|
|
||||||
|
|
||||||
@Test
|
assertNotNull(b);
|
||||||
public void testGetPrixHT() {
|
assertEquals("1984", b.getTitre());
|
||||||
// Vérification du prix HT arrondi à 3 décimales
|
assertEquals("George Orwell", b.getAuteur()); // corrigé
|
||||||
//assertEquals(20.0, livre.getPrixHT(), 0.001);
|
assertEquals("1234567890123", b.getIsbn());
|
||||||
}
|
assertFalse(b.isEmprunte()); // si la méthode existe
|
||||||
|
|
||||||
@Test
|
|
||||||
public void testIsEmprunte() {
|
|
||||||
// Par défaut, le livre n'est pas emprunté
|
|
||||||
assertFalse(livre.isEmprunte());
|
|
||||||
}
|
|
||||||
|
|
||||||
@Test
|
|
||||||
public void testSetEmprunte() {
|
|
||||||
livre.setEmprunte(true);
|
|
||||||
assertTrue(livre.isEmprunte());
|
|
||||||
livre.setEmprunte(false);
|
|
||||||
assertFalse(livre.isEmprunte());
|
|
||||||
}
|
|
||||||
|
|
||||||
@Test
|
|
||||||
public void testGetPrixTTC() {
|
|
||||||
// Calcul du prix TTC avec TVA 5.5% arrondi à 2 décimales
|
|
||||||
//assertEquals(21.1, livre.getPrixTTC(), 0.01);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
235
src/test/java/com/mycompany/bibliotheque/LivreValideTest.java
Normal file
235
src/test/java/com/mycompany/bibliotheque/LivreValideTest.java
Normal file
@@ -0,0 +1,235 @@
|
|||||||
|
/*
|
||||||
|
* Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
|
||||||
|
* Click nbfs://nbhost/SystemFileSystem/Templates/UnitTests/JUnit4TestClass.java to edit this template
|
||||||
|
*/
|
||||||
|
package com.mycompany.bibliotheque;
|
||||||
|
|
||||||
|
import com.mycompany.bibliotheque.Controle.LivreValide;
|
||||||
|
import com.mycompany.bibliotheque.Metier.Livre;
|
||||||
|
import org.junit.Before;
|
||||||
|
import org.junit.Test;
|
||||||
|
import static org.junit.Assert.*;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author dthev
|
||||||
|
*/
|
||||||
|
public class LivreValideTest {
|
||||||
|
|
||||||
|
public LivreValideTest() {
|
||||||
|
}
|
||||||
|
|
||||||
|
@Before
|
||||||
|
public void setUp() {
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Test of isValidIsbn method, of class LivreValide.
|
||||||
|
* @author Emile
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
public void testIsValidIsbn() {
|
||||||
|
System.out.println("isValidIsbn");
|
||||||
|
|
||||||
|
|
||||||
|
//Test 1 : un isbn avec moins de 13 carractères
|
||||||
|
System.out.println("Test1 : un isbn avec moins de 13 carractères");
|
||||||
|
String isbn1 = "1234568912";
|
||||||
|
boolean expResult1 = false;
|
||||||
|
boolean result1 = LivreValide.isValidIsbn(isbn1);
|
||||||
|
assertEquals("Le nombre de carractère est censé est trop petit",expResult1, result1);
|
||||||
|
assertFalse("Trop petit",LivreValide.isValidIsbn(isbn1));
|
||||||
|
System.out.println("Le test1 est validé");
|
||||||
|
System.out.println("--------------------------------------------------");
|
||||||
|
System.out.println(" ");
|
||||||
|
|
||||||
|
//Test2 : lettre dans l'isbn
|
||||||
|
System.out.println("Test2 : lettre dans l'isbn");
|
||||||
|
String isbn2 = "123456789ABC2";
|
||||||
|
boolean expResult2 = false;
|
||||||
|
boolean result2 = LivreValide.isValidIsbn(isbn2);
|
||||||
|
assertEquals("Les alphas ne sont pas autorisés", expResult2, result2);
|
||||||
|
System.out.println("Le test2 est validé");
|
||||||
|
System.out.println("--------------------------------------------------");
|
||||||
|
System.out.println(" ");
|
||||||
|
|
||||||
|
//Test3 : mauvais nombre de carratère 15
|
||||||
|
System.out.println("Test3: isbn comportant plus de 13 chiffres");
|
||||||
|
String isbn3 = "1234568912123568";
|
||||||
|
boolean expResult3 = false;
|
||||||
|
boolean result3 = LivreValide.isValidIsbn(isbn3);
|
||||||
|
assertEquals("Le nombre de carractère est censé est trop grand",expResult3, result3);
|
||||||
|
System.out.println("Le test3 est validé");
|
||||||
|
System.out.println("--------------------------------------------------");
|
||||||
|
System.out.println(" ");
|
||||||
|
|
||||||
|
//Test4 : Un isbn valide
|
||||||
|
System.out.println("Test4: Un isbn valide");
|
||||||
|
String isbn4 = "1234568912126";
|
||||||
|
boolean expResult4 = true;
|
||||||
|
boolean result4 = LivreValide.isValidIsbn(isbn4);
|
||||||
|
assertEquals("L'isbn est censé être valide",expResult4, result4);
|
||||||
|
System.out.println("Le test4 est validé");
|
||||||
|
System.out.println("--------------------------------------------------");
|
||||||
|
System.out.println(" ");
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Test of isValidTitre method, of class LivreValide.
|
||||||
|
* @author Salomé/Emile
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
public void testIsValidTitre() {
|
||||||
|
System.out.println("isValidTitre");
|
||||||
|
|
||||||
|
System.out.println("Test1 : un titre comportant un '<'");
|
||||||
|
String Titre1 = "La chat<perché";
|
||||||
|
boolean expResult1 = false;
|
||||||
|
boolean result1 = LivreValide.isValidTitre(Titre1);
|
||||||
|
assertEquals("Le chevron < n'est pas censé etre accepté",expResult1, result1);
|
||||||
|
System.out.println("Le test1 est validé");
|
||||||
|
System.out.println("--------------------------------------------------");
|
||||||
|
System.out.println(" ");
|
||||||
|
|
||||||
|
System.out.println("Test2 : un titre comportant un '>'");
|
||||||
|
String Titre2 = "La chat >perché";
|
||||||
|
boolean expResult2 = false;
|
||||||
|
boolean result2 = LivreValide.isValidTitre(Titre2);
|
||||||
|
assertEquals("Le chevron > n'est pas censé etre accepté",expResult2, result2);
|
||||||
|
System.out.println("Le test2 est validé");
|
||||||
|
System.out.println("--------------------------------------------------");
|
||||||
|
System.out.println(" ");
|
||||||
|
|
||||||
|
|
||||||
|
System.out.println("Test3 : un titre valide");
|
||||||
|
String Titre3 = "La chat perché";
|
||||||
|
boolean expResult3 = true;
|
||||||
|
boolean result3 = LivreValide.isValidTitre(Titre3);
|
||||||
|
assertEquals("Ce titre est cencé être valide",expResult3, result3);
|
||||||
|
System.out.println("Le test3 est validé");
|
||||||
|
System.out.println("--------------------------------------------------");
|
||||||
|
System.out.println(" ");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Test of isValidAuteur method, of class LivreValide.
|
||||||
|
* @author Medhi
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
public void testIsValidAuteur() {
|
||||||
|
System.out.println("isValidAuteur");
|
||||||
|
|
||||||
|
//Verification Bonne
|
||||||
|
String auteurTrue = "George";
|
||||||
|
boolean expResult = true;
|
||||||
|
boolean result = LivreValide.isValidAuteur(auteurTrue);
|
||||||
|
assertEquals("Cas d'utilisation prévu",expResult, result);
|
||||||
|
|
||||||
|
//Verification avec un nombre
|
||||||
|
String auteurFalse1 = "George4";
|
||||||
|
boolean expResult1 = false;
|
||||||
|
boolean result1 = LivreValide.isValidAuteur(auteurFalse1);
|
||||||
|
assertEquals("Non valide car un nombre est présent", expResult1,result1);
|
||||||
|
|
||||||
|
//Verification avec des caractères spéciaux
|
||||||
|
String auteurFalse2 = "George_";
|
||||||
|
boolean expResult2 = false;
|
||||||
|
boolean result2 = LivreValide.isValidAuteur(auteurFalse2);
|
||||||
|
assertEquals("Non valide car des caractères spéciaux sont présent", expResult2,result2);
|
||||||
|
|
||||||
|
//Verification avec des espace
|
||||||
|
String auteurTrue3 = "George Orwell";
|
||||||
|
boolean result3 = LivreValide.isValidAuteur(auteurTrue3);
|
||||||
|
assertTrue("",result3);
|
||||||
|
|
||||||
|
//Verification avec -
|
||||||
|
String auteurTrue4 = "George-Orwell";
|
||||||
|
boolean result4 = LivreValide.isValidAuteur(auteurTrue4);
|
||||||
|
assertTrue("",result4);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Test of isLongueurTitreValid method, of class LivreValide.
|
||||||
|
* @author Morgann
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
public void testIsLongueurTitreValid() {
|
||||||
|
System.out.println("isLongueurTitreValid");
|
||||||
|
|
||||||
|
//test 1 : aucune valeur saisie
|
||||||
|
System.out.println("Test avec aucune valeur saisie");
|
||||||
|
String titre1 = "";
|
||||||
|
boolean expResult1 = false;
|
||||||
|
boolean result1 = LivreValide.isLongueurTitreValid(titre1);
|
||||||
|
assertEquals(expResult1, result1);
|
||||||
|
System.out.println("Titre invalide. Aucune valeur n'a été saisie\n");
|
||||||
|
|
||||||
|
//test 2 : titre inférieur à 200
|
||||||
|
System.out.println("Test avec valeur saisie OK");
|
||||||
|
String titre2 = "Hadal Blacksite bestiary";
|
||||||
|
boolean expResult2 = true;
|
||||||
|
boolean result2 = LivreValide.isLongueurTitreValid(titre2);
|
||||||
|
assertEquals(expResult2, result2);
|
||||||
|
System.out.println("Titre valide. Le titre a moins de 200 caractères\n");
|
||||||
|
|
||||||
|
System.out.println("Test avec un titre avec plus de 200 caractères");
|
||||||
|
String titre3 = "YOU !! You could've had everything you ever wanted... Everything I ever wanted... And you still went out of your way to take everything I had left in the process. You entitled brat. You expect me to sit idly by and keep smiling, As if nothing ever happened? Oh, I'm smiling alright... GRINNING ear to ear. Don't even start with that 'following orders' schlock. You knew what you were doing all too well. Sure took your sweet time. Enjoyed every last second of it? Good. *Chuckles* EXCELLENT, even! I'll merely return the favor. And you bet, I'll be enjoying, every last moment, of THIS!!! THE BEST PART!? I get to do this, over, and over, again. You'll come back, I'll know, and I'll be waiting... You have no one to blame but yourself. You're in a hell of your own making... And you're NEVER GETTING OUT!!! *grrgh* WHAT!!! WHAT IS IT THIS TIME!?!?";
|
||||||
|
boolean expResult3 = false;
|
||||||
|
boolean result3 = LivreValide.isLongueurTitreValid(titre3);
|
||||||
|
assertEquals(expResult3, result3);
|
||||||
|
System.out.println("Titre invalide. Titre trop long\n");
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Test of isTitreValid method, of class LivreValide.
|
||||||
|
* @author Steve
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
public void testIsContenuTitreValide() {
|
||||||
|
System.out.println("isTitreValid");
|
||||||
|
String titre = "";
|
||||||
|
assertFalse("Le titre ne doit pas être vide !", LivreValide.isContenuTitreValide(titre));
|
||||||
|
titre = null;
|
||||||
|
assertFalse("Le titre ne peut pas être nul !", LivreValide.isContenuTitreValide(titre));
|
||||||
|
titre = "Ti";
|
||||||
|
assertTrue("Le titre fait au moins 2 caractères alphabétiques !", LivreValide.isContenuTitreValide(titre));
|
||||||
|
titre = "T";
|
||||||
|
assertFalse("Le titre fait au moins 2 caractères alphabétiques !", LivreValide.isContenuTitreValide(titre));
|
||||||
|
titre = "1234";
|
||||||
|
assertFalse("Le titre fait au moins 2 caractères alphabétiques !", LivreValide.isContenuTitreValide(titre));
|
||||||
|
titre = "Ti2";
|
||||||
|
assertTrue("Le titre fait au moins 2 caractères alphabétiques !", LivreValide.isContenuTitreValide(titre));
|
||||||
|
titre = "*$!";
|
||||||
|
assertFalse("Le titre fait au moins 2 caractères alphabétiques !", LivreValide.isContenuTitreValide(titre));
|
||||||
|
titre = "Ti!";
|
||||||
|
assertTrue("Le titre fait au moins 2 caractères alphabétiques !", LivreValide.isContenuTitreValide(titre));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Test testIsDisponible()
|
||||||
|
* Vérifier livre pas déjà emprunté
|
||||||
|
* @author Emile
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
public void testIsDisponible(){
|
||||||
|
System.out.println("isDisponible");
|
||||||
|
Livre unLivre = new Livre("Le comte de MonteCristo","Alexandre Dumas", "1234567891245", false);
|
||||||
|
|
||||||
|
System.out.println("Test1 : un livre disponible");
|
||||||
|
boolean result1 = LivreValide.isDisponible(unLivre);
|
||||||
|
assertTrue("Le chevron < n'est pas censé etre accepté", result1);
|
||||||
|
System.out.println("Le test1 est validé");
|
||||||
|
System.out.println("--------------------------------------------------");
|
||||||
|
System.out.println(" ");
|
||||||
|
|
||||||
|
unLivre.setEmprunte(true);
|
||||||
|
System.out.println("Test2 : un livre indiisponible");
|
||||||
|
boolean result2 = LivreValide.isDisponible(unLivre);
|
||||||
|
assertFalse("Le chevron < n'est pas censé etre accepté", result2);
|
||||||
|
System.out.println("Le test2 est validé");
|
||||||
|
System.out.println("--------------------------------------------------");
|
||||||
|
System.out.println(" ");
|
||||||
|
}
|
||||||
|
}
|
@@ -4,6 +4,9 @@
|
|||||||
*/
|
*/
|
||||||
package com.mycompany.bibliotheque;
|
package com.mycompany.bibliotheque;
|
||||||
|
|
||||||
|
import com.mycompany.bibliotheque.Metier.Utilisateur;
|
||||||
|
import com.mycompany.bibliotheque.Metier.Livre;
|
||||||
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import org.junit.Before;
|
import org.junit.Before;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
@@ -52,17 +55,27 @@ public class UtilisateurTest {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Test of emprunterLivre method, of class Utilisateur.
|
* Test of emprunterLivre method, of class Utilisateur.
|
||||||
|
* @author Madhi
|
||||||
*/
|
*/
|
||||||
@Test
|
@Test
|
||||||
public void testEmprunterLivre() {
|
public void testEmprunterLivre() {
|
||||||
System.out.println("emprunterLivre");
|
System.out.println("emprunterLivre");
|
||||||
Livre livre = null;
|
|
||||||
Utilisateur instance = null;
|
Livre a = new Livre("1984", "George Orwell", "1234567890123", false);
|
||||||
boolean expResult = false;
|
Livre b = new Livre("1984", "Test2", "1232667890123", false);
|
||||||
boolean result = instance.emprunterLivre(livre);
|
Livre c = new Livre ("1888","Test3","1232667890123",false);
|
||||||
assertEquals(expResult, result);
|
Livre d = new Livre ("1263","Test4","1236267890123",false);
|
||||||
// TODO review the generated test code and remove the default call to fail.
|
|
||||||
fail("The test case is a prototype.");
|
ArrayList<Livre> mesLivres = new ArrayList<>();
|
||||||
|
|
||||||
|
Utilisateur utilisateur = new Utilisateur("Medhi", mesLivres);
|
||||||
|
boolean result = utilisateur.emprunterLivre(a);
|
||||||
|
|
||||||
|
assertTrue("L'utilisateur a trop de livres",result);
|
||||||
|
result = utilisateur.emprunterLivre(b);
|
||||||
|
result = utilisateur.emprunterLivre(c);
|
||||||
|
result = utilisateur.emprunterLivre(d);
|
||||||
|
assertFalse("L'utilisateur n'a pas encore trois emprunts ",result);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user