forked from pierront/mylibrary-template
Passer commande #4
+12
-1
@@ -15,7 +15,18 @@ public final class CommandeConverter {
|
||||
.ville(adressInfo.ville())
|
||||
.codePostal(adressInfo.codePostal())
|
||||
.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();
|
||||
}
|
||||
|
||||
|
||||
+1
-3
@@ -1,15 +1,13 @@
|
||||
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.customer.entity.Customer;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Optional;
|
||||
import java.util.UUID;
|
||||
|
||||
public class ComandeRepository {
|
||||
public class CommandeRepository {
|
||||
|
||||
private final List<Commande> commande = new ArrayList<>();
|
||||
|
||||
+2
-2
@@ -17,14 +17,14 @@ import static org.junit.jupiter.api.Assertions.*;
|
||||
|
||||
public class CommandeRepositoryTest {
|
||||
|
||||
private ComandeRepository repository;
|
||||
private CommandeRepository repository;
|
||||
private Commande commandeN1;
|
||||
private Commande commandeN2;
|
||||
private Commande commandeN3;
|
||||
|
||||
@BeforeEach
|
||||
void setUp() {
|
||||
repository = new ComandeRepository();
|
||||
repository = new CommandeRepository();
|
||||
|
||||
UUID clientId = UUID.randomUUID();
|
||||
List<LigneCommandeInfo> lignesCommande = new ArrayList<>();
|
||||
|
||||
Reference in New Issue
Block a user