public WhenRegisterAnUser(GivenUser givenAnUser) { _givenAnUser = givenAnUser; _registeredUsers = new List <User> { new User("*****@*****.**", "*****@*****.**", "joao.xpto", "123456"), new User("*****@*****.**", "*****@*****.**", "xpto", "123456") }; newUser = new User("*****@*****.**", "*****@*****.**", "gustavo", "123456"); strongPassword = _givenAnUser.EncryptionService.GenereteEncryption(newUser.Password); userExists = _registeredUsers.AsQueryable().Any(UserSpecs.UserAlreadyExists(newUser)); }
public bool CheckIfUserAlreadyExist(User user) { return(_context.User.Any(UserSpecs.UserAlreadyExists(user))); }