refactor nom fichier

This commit is contained in:
2026-06-14 19:42:04 +02:00
parent 73e066b593
commit ae8daf5e2c
3 changed files with 15 additions and 6 deletions
@@ -15,7 +15,18 @@ public final class CommandeConverter {
.ville(adressInfo.ville()) .ville(adressInfo.ville())
.codePostal(adressInfo.codePostal()) .codePostal(adressInfo.codePostal())
.pays(adressInfo.pays()) .pays(adressInfo.pays())
.modePaiement(modePaiement) .modePaiement(commandeInfo.modePayement())
.build();
}
public static Commande toDomain(CommandeInfo commandeInfo, AdresseInfo adressInfo) {
return Commande.builder()
.lignesCommande(commandeInfo.listeLigne())
.rue(adressInfo.rue())
.ville(adressInfo.ville())
.codePostal(adressInfo.codePostal())
.pays(adressInfo.pays())
.modePaiement(commandeInfo.modePayement())
.build(); .build();
} }
@@ -1,15 +1,13 @@
package fr.iut_fbleau.but3.dev62.mylibrary.commande.repository; package fr.iut_fbleau.but3.dev62.mylibrary.commande.repository;
import fr.iut_fbleau.but3.dev62.mylibrary.book.entity.Book;
import fr.iut_fbleau.but3.dev62.mylibrary.commande.entity.Commande; import fr.iut_fbleau.but3.dev62.mylibrary.commande.entity.Commande;
import fr.iut_fbleau.but3.dev62.mylibrary.customer.entity.Customer;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import java.util.Optional; import java.util.Optional;
import java.util.UUID; import java.util.UUID;
public class ComandeRepository { public class CommandeRepository {
private final List<Commande> commande = new ArrayList<>(); private final List<Commande> commande = new ArrayList<>();
@@ -17,14 +17,14 @@ import static org.junit.jupiter.api.Assertions.*;
public class CommandeRepositoryTest { public class CommandeRepositoryTest {
private ComandeRepository repository; private CommandeRepository repository;
private Commande commandeN1; private Commande commandeN1;
private Commande commandeN2; private Commande commandeN2;
private Commande commandeN3; private Commande commandeN3;
@BeforeEach @BeforeEach
void setUp() { void setUp() {
repository = new ComandeRepository(); repository = new CommandeRepository();
UUID clientId = UUID.randomUUID(); UUID clientId = UUID.randomUUID();
List<LigneCommandeInfo> lignesCommande = new ArrayList<>(); List<LigneCommandeInfo> lignesCommande = new ArrayList<>();