Skip to content

Instantly share code, notes, and snippets.

@borodicht
Created December 3, 2024 06:48
Show Gist options
  • Save borodicht/6dccc0023400f369d9c88e7857143a95 to your computer and use it in GitHub Desktop.
Save borodicht/6dccc0023400f369d9c88e7857143a95 to your computer and use it in GitHub Desktop.
package dto;
public class Account {
String accountName;
String phone;
String fax;
String rating;
public Account(String accountName, String phone, String fax, String rating) {
this.accountName = accountName;
this.phone = phone;
this.fax = fax;
this.rating = rating;
}
public String getAccountName() {
return accountName;
}
public void setAccountName(String accountName) {
this.accountName = accountName;
}
public String getPhone() {
return phone;
}
public void setPhone(String phone) {
this.phone = phone;
}
public String getFax() {
return fax;
}
public void setFax(String fax) {
this.fax = fax;
}
public String getRating() {
return rating;
}
public void setRating(String rating) {
this.rating = rating;
}
}
package dto;
import com.github.javafaker.Faker;
public class AccountFactory {
public static Account getAccount(String rating) {
Faker faker = new Faker();
return new Account(faker.company().name(), faker.phoneNumber().phoneNumber(),
faker.phoneNumber().cellPhone(), rating);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment