forked from pierront/mylibrary-template
ajout test sur commandID
This commit is contained in:
@@ -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());
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user