This library have a objective for help a devellopers and testers during the application tests.
For many times is necesary the create a tests for payment validation using the credit card fake and this library is one facilitator for this scenaries.
In pom.xml, add the following xml stanza between <dependencies> ... </dependencies>
<dependency>
<groupId>com.github.fakecreditcard</groupId>
<artifactId>fake-creditcard</artifactId>
<version>1.0.0</version>
</dependency>
For gradle users, add the following to your build.gradle file.
dependencies {
implementation 'com.github.fakecreditcard:fake-creditcard:1.0.0'
}
In your Java code
Creditcard card = FakeCard.visa();
Creditcard card = FakeCard.master();
The return of card genetor is
public class Creditcard {
private String number;
private String holderName;
private String cvv;
private String expDate;
private String expirationYear;
private String expirationMonth;
}
Copyright (c) 2019 Fernando Godóy. See the LICENSE file for license rights and limitations.