UNPKG

@raphaeldeveloper/whoiam.domain

Version:

Project with domain rules about user authentication.

21 lines (17 loc) 414 B
module.exports = class UserAccountRepositoryStub { constructor() { this.users = []; } insert(user) { this.users.push(user); } getByUserName(userName) { return this.users.find(u => u.userName === userName); } getByEmail(email) { return this.users.find(u => u.email == email); } getAll() { return this.users; } }