Last active
June 1, 2017 06:56
-
-
Save woprzech/ed53ca2662f1c72aad0ab3d412defbbd to your computer and use it in GitHub Desktop.
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
@Profile("transient") | |
public class FakeAccountRepository implements AccountRepository { | |
Map<User, Account> accounts = new HashMap<>(); | |
public FakeAccountRepository() { | |
this.accounts.put(new User("john@bmail.com"), new UserAccount()); | |
this.accounts.put(new User("boby@bmail.com"), new AdminAccount()); | |
} | |
String getPasswordHash(User user) { | |
return accounts.get(user).getPasswordHash(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment