Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Blog post about Data Management - MyTestWithDynamicData code snippet
public class MyTestWithDynamicData {
@Test
void cannotPayWithExpiredCreditCard() {
DynamicData dynamicData = new DynamicData();
CreditCard creditCard = dynamicData.creditCard().withRestriction(Restriction.EXPIRED);
// extraction the credit card information to use in the test
String holderName = creditCard.getHolderName();
String creditCardNumber = creditCard.getNumber();
String expirationDate = creditCard.getExpirationDate();
String cvv = creditCard.getCvv();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.