Created
December 3, 2024 06:48
-
-
Save borodicht/6dccc0023400f369d9c88e7857143a95 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
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; | |
} | |
} |
This file contains hidden or 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
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