ajout test sur commandID

This commit is contained in:
2026-06-13 13:54:40 +02:00
parent 2c14ee5e0b
commit ce27a686ef
@@ -61,6 +61,18 @@ public class CommandeTest {
assertNotEquals(originalId, commande.getClientId());
}
@Test
@DisplayName("setRandomUUID should change the ID to a new random UUID")
void testSetRandomUUIDForCommande() {
Commande commande = Commande.builder().build();
UUID originalId = commande.getCommandeId();
commande.setRandomUUIDCommand();
assertNotNull(commande.getCommandeId());
assertNotEquals(originalId, commande.getCommandeId());
}