Created
July 30, 2020 11:56
-
-
Save eliasnogueira/aedc3028cc6f6310d6b164387f15c23e to your computer and use it in GitHub Desktop.
Blog post about Data Management - MyTestWithDynamicData code snippet
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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